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

New flake8 gives errors #137

Closed
LourensVeen opened this issue Nov 29, 2022 · 0 comments · Fixed by #184
Closed

New flake8 gives errors #137

LourensVeen opened this issue Nov 29, 2022 · 0 comments · Fixed by #184
Assignees

Comments

@LourensVeen
Copy link
Contributor

LourensVeen commented Nov 29, 2022

The newly released flake8 version 6 gives some spurious "X imported but unused" errors for some of our type annotations. This is because flake8 version 6 upgrades to pyflakes version 3, which removed support for them (see PyCQA/pyflakes#684).

Type comments were introduced in PEP-484, and were the only way to write type annotations for variables until Python 3.6, when PEP-526 was implemented. So instead of primes = [] # type: List[int] we now get to write primes: List[int] = [].

We're kind of in the midst of things at the moment, so the short term solution is to specify flake8<6 in tox.ini so the tests will run. Then we can go and remove all our type comments when the checkpointing/profiling/shared-mem dust settles down a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants