Scope the filament AMS length check to presets the vendor bundle references

The tree-wide length check (freed from its BBL/OFL carve-out last commit)
was flagging 21 pre-existing SeeMeCNC files that no vendor index references
and that therefore never load, turning CI red for files with no bearing on
what ships. The rule now only fires on presets a vendor's filament_list
actually references; every .json under the vendor's filament directory is
still parsed through the duplicate-key hook, so that coverage is unchanged.

Also removed a duplicated BAMBU_MAP_PATH definition: update_bambu_filament_ids.py
now imports the constant from assign_filament_ids.py, which it already imports
several other constants from, instead of recomputing the same path independently.
This commit is contained in:
SoftFever
2026-09-04 14:42:57 +08:00
parent 40cc3340b1
commit db3d684ee0
3 changed files with 31 additions and 15 deletions

View File

@@ -55,6 +55,7 @@ import datetime
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from assign_filament_ids import ( # noqa: E402
BAMBU_MAP_PATH,
OFL,
OF_ID_RE,
PROFILES_DIR,
@@ -69,10 +70,6 @@ from assign_filament_ids import ( # noqa: E402
resolve_triple,
)
SCRIPTS_DIR = os.path.dirname(os.path.abspath(__file__))
BAMBU_MAP_PATH = os.path.normpath(
os.path.join(SCRIPTS_DIR, "..", "resources", "printers", "bambu_filament_ids.json"))
BAMBUSTUDIO_REPO = "https://github.com/bambulab/BambuStudio"