Skip to content

Commit

Permalink
Enable mypy on Invoke tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentClarret committed Jul 2, 2024
1 parent e1a55a8 commit e47b2a3
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,27 @@ disallow_untyped_defs = false
show_column_numbers = true
# Exclude unit tests for now
exclude = ['tasks/unit-tests']
files = ['tasks']
disable_error_code = [
# TODO: fix them later
"assignment",
"index",
"operator",
"arg-type",
"typeddict-item",
"annotation-unchecked",
"call-overload",
"var-annotated",
"misc",
"type-arg",
"union-attr",
"override",
"list-item",
"return-value",
"return",
"str-bytes-safe",
"name-match",
]

[tool.vulture]
ignore_decorators = ["@task"]
Expand Down
2 changes: 2 additions & 0 deletions tasks/linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ def python(ctx):
# We want to the CI to fail if there are any issues
ctx.run("ruff format --check .")
ctx.run("ruff check .")
ctx.run("mypy")
else:
# Otherwise we just need to format the files
ctx.run("ruff format .")
ctx.run("ruff check --fix .")
ctx.run("mypy")

ctx.run("vulture")

Expand Down

0 comments on commit e47b2a3

Please sign in to comment.