Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix mypy errors in the entire codebase #8577

dhruvmanila started this conversation in Team Posts
Discussion options

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 keep typing.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 using list[type] but mypy 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?

You must be logged in to vote

Replies: 2 comments

Comment options

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.

You must be logged in to vote
0 replies
Comment options

That would probably fail some of the checks as some files could rely on that dependency.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /