-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
Fix mypy errors #194
Fix mypy errors #194
Conversation
Drop Python 3.5
@nicoddemus if you agree with this drop in 3.5, I can proceed with more strict typing support PRs. |
Hi @staticdev, First of all, thanks for tackling this!
Can you explain why is that? I noticed you added an annotation to |
@nicoddemus you are right. It is an alternative solution. This comment makes mypy just ignore the type. By doing the way I did: |
The problem is that I wouldn't like to drop support for 3.5 just yet without a very strong reason, so I'm 👎 on 1). What do you think? |
I think 3.5 EOL is just around the corner. You can see that here. There is no problem on holding a release until then, but we could maybe create pre-releases and getting ready for that? Another idea is to create a new major version and put a version compatibility table on the readme, like in: https://pypi.org/project/django-bootstrap-pagination/ |
@nicoddemus @jtpavlock I managed to get this PR working WITH 3.5, based on pytest 6.0. This PR gives initial support to pytest-mock type-hinting. There are two catches: |
That should be fine, as it should only affect users that want to use
You can use type-hint comments for that: _mock_module_originals = {} # type: Dict[str, Any] pytest uses it a lot because of lack of variable type annotations due to Python 3.5. I will re-add that to your PR. 👍 |
Thanks @staticdev! |
Closes #193