Skip to content

Commit

Permalink
Actually fix Mypy/Ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dosisod committed Nov 21, 2024
1 parent bb2c223 commit 4fee0cc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ lint.select = ["ALL"]

# TODO: fix RUF100 not playing well with refurb
lint.extend-ignore = [
"A001", "A002", "A003",
"A001", "A002", "A003", "A005",
"ANN101", "ANN102", "ANN401", "ARG001",
"B905",
"C901",
Expand Down
4 changes: 2 additions & 2 deletions test/mypy_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __call__(self, path: str) -> PathEntryFinder:

return finder

sys.path_hooks = [PreferPureLoaderHook(h) for h in sys.path_hooks]
sys.path_hooks = [PreferPureLoaderHook(h) for h in sys.path_hooks] # type: ignore
sys.path_importer_cache.clear()

yield
Expand All @@ -81,7 +81,7 @@ def __call__(self, path: str) -> PathEntryFinder:
for hook in sys.path_hooks:
assert isinstance(hook, PreferPureLoaderHook)
original_hooks.append(hook.orig_hook)
sys.path_hooks = original_hooks
sys.path_hooks = original_hooks # type: ignore
sys.path_importer_cache.clear()


Expand Down
2 changes: 1 addition & 1 deletion test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_generate_subcommand():
def test_help_flag_calls_print():
for args in (["--help"], ["-h"], []):
with patch("builtins.print") as p:
main(args) # type: ignore
main(args)

p.assert_called_once()
assert "usage" in p.call_args[0][0]
Expand Down
1 change: 0 additions & 1 deletion test/test_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@ def test_mypy_consistence() -> None:
# it for now until we choose to add support for it.
mypy_visitor_mapping.pop("visit_type_alias_stmt")


assert mypy_visitor_mapping == METHOD_NODE_MAPPINGS

0 comments on commit 4fee0cc

Please sign in to comment.