chore: sync workflows, scripts, and configurations from MokoStandards
This commit is contained in:
@@ -31,13 +31,14 @@ Exit codes:
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import pickle
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, asdict
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
|
||||
|
||||
# Version
|
||||
@@ -145,7 +146,6 @@ class DetectionCache:
|
||||
with open(cache_file, 'wb') as f:
|
||||
pickle.dump(result, f)
|
||||
except (pickle.PickleError, OSError):
|
||||
# Ignore cache write failures: cache is optional optimization
|
||||
pass
|
||||
|
||||
def clear(self) -> None:
|
||||
@@ -154,7 +154,6 @@ class DetectionCache:
|
||||
try:
|
||||
cache_file.unlink()
|
||||
except OSError:
|
||||
# Ignore failures to delete cache files: stale cache entries are non-critical
|
||||
pass
|
||||
|
||||
|
||||
@@ -229,6 +228,7 @@ class PlatformDetector:
|
||||
indicators: List[str] = []
|
||||
metadata: Dict[str, str] = {}
|
||||
|
||||
manifest_patterns = ["**/*.xml"]
|
||||
skip_dirs = {".git", "vendor", "node_modules", ".github"}
|
||||
|
||||
for xml_file in self.repo_path.glob("**/*.xml"):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Copyright (C) 2025-2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
|
||||
|
||||
This file is part of a Moko Consulting project.
|
||||
|
||||
|
||||
@@ -27,11 +27,12 @@ Exit codes:
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import argparse
|
||||
import xml.etree.ElementTree as ET
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import List, Dict, Optional, Any
|
||||
from typing import List, Dict, Tuple, Optional, Any
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
@@ -112,8 +113,6 @@ class RepositoryStructureValidator:
|
||||
elif content.startswith('<?xml') or content.startswith('<'):
|
||||
return "xml"
|
||||
except Exception:
|
||||
# Intentionally ignore read/parse errors; fall through to the generic
|
||||
# "Unable to detect schema format" ValueError raised below.
|
||||
pass
|
||||
|
||||
# Unable to detect format
|
||||
|
||||
Reference in New Issue
Block a user