Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set mypy_path in mypy.ini #2455

Merged
merged 1 commit into from
Aug 28, 2021
Merged

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Aug 28, 2021

From https://github.com/pre-commit/mirrors-mypy/issues/43 it looks like this should address the issue reported in #2238 (comment)

Seems to work for me:

(black) marco@marco-Predator-PH315-52:~/black-dev$ git checkout main 
Switched to branch 'main'
Your branch is up-to-date with 'upstream/main'.
(black) marco@marco-Predator-PH315-52:~/black-dev$ pre-commit run mypy --files tests/test_ipynb.py 
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

tests/test_ipynb.py:4:1: error: Module "black" has no attribute "format_cell"
tests/test_ipynb.py:21:16: error: Unexpected keyword argument "is_ipynb" for "Mode"
Found 2 errors in 1 file (checked 1 source file)


(black) marco@marco-Predator-PH315-52:~/black-dev$ git checkout fixup-mypy-path 
Switched to branch 'fixup-mypy-path'
Your branch is up-to-date with 'origin/fixup-mypy-path'.
(black) marco@marco-Predator-PH315-52:~/black-dev$ pre-commit run mypy --files tests/test_ipynb.py 
mypy.....................................................................Passed

@JelleZijlstra JelleZijlstra added the skip news Pull requests that don't need a changelog entry. label Aug 28, 2021
Copy link
Collaborator

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JelleZijlstra JelleZijlstra merged commit fcfead9 into psf:main Aug 28, 2021
@MarcoGorelli MarcoGorelli deleted the fixup-mypy-path branch August 28, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news Pull requests that don't need a changelog entry.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants