Skip to content

Commit 701c460

Browse files
fix: resolve import error in test_yaml_handler.py
- Add type ignore comments for dynamic import resolution - Add noqa comments to suppress linter warnings for import ordering - Improve import formatting with multi-line structure - All tests now pass with no linting errors
1 parent de04475 commit 701c460

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/test_yaml_handler.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@
1010
import yaml # type: ignore[import-untyped]
1111

1212
# Add the scripts directory to the path
13-
sys.path.insert(0, str(Path(__file__).parent.parent / "scripts"))
14-
15-
from handlers.yaml_handler import apply_yaml_suggestion, validate_yaml_suggestion
13+
scripts_dir = str(Path(__file__).parent.parent / "scripts")
14+
sys.path.insert(0, scripts_dir)
15+
16+
# Import after path manipulation
17+
from handlers.yaml_handler import ( # type: ignore[import-untyped] # noqa: E402
18+
apply_yaml_suggestion,
19+
validate_yaml_suggestion,
20+
)
1621

1722

1823
def test_yaml_suggestion_application():

0 commit comments

Comments
 (0)