Skip to content

Commit

Permalink
tox.ini: Make mypy allow unused "type: ignore" comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoelndorfer committed Jan 7, 2024
1 parent c244d02 commit 4926528
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ deps =
mypy == 1.8.0
pytest-mypy >= 0.10.3
basepython = py38

# Don't have mypy report unused ignores. Pyright is used
# for day-to-day development, while mypy is used for code
# quality checks. mypy will not always produce an error
# where pyright does. Specifically, calling an abstract
# class method produces a pyright type error, but it
# does not trigger a mypy error when testing.
commands =
mypy --version
mypy --strict src/ tests/
mypy --no-warn-unused-ignores --strict src/ tests/

[testenv:docs]
# sphinx imports d2lfg to get the library version in docs/source/conf.py.
Expand Down

0 comments on commit 4926528

Please sign in to comment.