[core] Enable ruff BLE (flake8-blind-except) lint family (#16659)

This commit is contained in:
J. Nick Koston
2026-05-27 03:09:57 -05:00
committed by GitHub
parent 7463a15c7e
commit 3cc875c40b
23 changed files with 30 additions and 29 deletions

View File

@@ -128,7 +128,7 @@ def uses_local_file_references(component_dir: Path) -> bool:
try:
content = common_yaml.read_text()
except Exception: # pylint: disable=broad-exception-caught
except Exception: # noqa: BLE001 # pylint: disable=broad-exception-caught
return False
# Pattern to match $component_dir or ${component_dir} references
@@ -164,7 +164,7 @@ def is_platform_component(component_dir: Path) -> bool:
try:
content = comp_init.read_text()
return "IS_PLATFORM_COMPONENT = True" in content
except Exception: # pylint: disable=broad-exception-caught
except Exception: # noqa: BLE001 # pylint: disable=broad-exception-caught
return False
@@ -222,7 +222,7 @@ def analyze_yaml_file(yaml_file: Path) -> dict[str, Any]:
try:
data = yaml_util.load_yaml(yaml_file)
result["loaded"] = True
except Exception: # pylint: disable=broad-exception-caught
except Exception: # noqa: BLE001 # pylint: disable=broad-exception-caught
return result
# Check for Extend/Remove objects