Skip to content

Commit

Permalink
Enable the use of Mypy 0.900+
Browse files Browse the repository at this point in the history
Mypy would complain about the missing `types-mock` package, which it now
needs to perform accurate type checking and despite
`ignore_missing_imports` set to `True`:

    tests/test_ipython.py:3: error: Library stubs not installed for "mock" (or incompatible with Python 3.9)
    tests/test_ipython.py:3: note: Hint: "python3 -m pip install types-mock"
    tests/test_ipython.py:3: note: (or run "mypy --install-types" to install all missing stub packages)
    tests/test_ipython.py:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
    tests/test_main.py:7: error: Library stubs not installed for "mock" (or incompatible with Python 3.9)
    Found 2 errors in 2 files (checked 15 source files)
  • Loading branch information
bbc2 committed Jul 14, 2021
1 parent 28dbb23 commit de24f42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pytest-cov
pytest>=3.9
sh>=1.09
tox
types-mock
wheel
twine
portray
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ commands = coverage run --parallel -m pytest {posargs}
skip_install = true
deps =
flake8
mypy<0.900
mypy
types-mock
commands =
flake8 src tests
mypy --python-version=3.9 src tests
Expand Down

0 comments on commit de24f42

Please sign in to comment.