-
-
Notifications
You must be signed in to change notification settings - Fork 47.7k
Fix mypy errors in the entire codebase #8577
dhruvmanila
started this conversation in
Team Posts
-
We need to fix all the mypy
errors and they are increasing with the number of commits. I am planning to open an issue indicating this problem and asking for help. Some questions in my mind:
- As Python 3.9 is out, do we switch to
list[type]
or keeptyping.List
? Note: We do not yet run Python 3.9 on our CI as some of the dependencies aren't compatible yet. - Some files do contain
from __future__ import annotation
and usinglist[type]
butmypy
complains about it:
backtracking/minimax.py:15: error: "list" is not subscriptable, use "typing.List" instead
So, do we switch to Python 3.9 compatible type hints or advise users to user the typing
module instead?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
At this point, we should switch to Python 3.9 (dropping any dependencies which are not ready) and then mypy should accept the syntax without the future import.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
-
That would probably fail some of the checks as some files could rely on that dependency.
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment