lint(ruff): fix E402 and related import issues

- Fix E402 by removing sys.path hacks and ensuring imports are at module top level
- Replace ad-hoc imports with proper package imports (filter_plugins, lookup_plugins, module_utils, cli)
- Make lookup plugins importable via package paths (e.g. lookup_plugins.application_gid)
- Clean up test imports to rely on installed package layout instead of sys.path manipulation
- Partially fix F821 caused by missing/invalid imports

This establishes a consistent, ruff-compliant import architecture across CLI, filters, plugins, and tests.
This commit is contained in:
2025-12-17 14:36:29 +01:00
parent 73f7c00acd
commit 176c8799ce
41 changed files with 31 additions and 184 deletions

View File

@@ -7,7 +7,6 @@ from ruamel.yaml import YAML
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from module_utils.entity_name_utils import get_entity_name
# Paths to the group-vars files