chore: fix mypy warnings in tests/cs/prompts
What does this merge request do and why?
This MR fixes all mypy warnings on tests/code_suggestions/prompts/ folder.
❯ poetry run mypy tests/code_suggestions/prompts/
tests/code_suggestions/prompts/parsers/test_tree_traversal.py:100: error: Argument 1 to "append" of "list" has incompatible type "Node"; expected "type" [arg-type]
tests/code_suggestions/prompts/parsers/test_counters.py:493: error: "dict" expects 2 type arguments, but 1 given [type-arg]
tests/code_suggestions/prompts/parsers/test_blocks.py:156: error: Item "None" of "Node | None" has no attribute "type" [union-attr]
tests/code_suggestions/prompts/parsers/test_blocks.py:157: error: Item "None" of "Node | None" has no attribute "start_point" [union-attr]
tests/code_suggestions/prompts/parsers/test_blocks.py:157: error: Item "None" of "Node | None" has no attribute "end_point" [union-attr]
Found 5 errors in 3 files (checked 8 source files)
How to set up and validate locally
- Check out to this merge request's branch.
- Ensure the following commands do not result in any warnings (they are already run as part of CI).
make check-mypy make test
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Contributes to #715 (closed)
Edited by Tan Le