-
Notifications
You must be signed in to change notification settings - Fork 180
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
the next release (pyflakes 3.0.0) #740
Comments
I've run my usually regression analysis -- only a few things come up but all of them are intentional (due to diff -ur out_baseline/numpy.log out_main/numpy.log
--- out_baseline/numpy.log 2022-11-21 13:11:52.351877534 -0500
+++ out_main/numpy.log 2022-11-21 13:12:34.043878508 -0500
@@ -1089,6 +1089,7 @@
./numpy/typing/mypy_plugin.py:42:5: 'mypy.types' imported but unused
./numpy/typing/tests/data/pass/array_constructors.py:1:1: 'sys' imported but unused
./numpy/typing/tests/data/pass/scalars.py:1:1: 'sys' imported but unused
+./numpy/typing/tests/data/pass/simple.py:5:1: 'collections.abc.Iterable' imported but unused
./setup.py:67:1: 'numpy.distutils.command.sdist' imported but unused
./tools/changelog.py:37:1: 'sys' imported but unused
./tools/cythonize.py:178:9: local variable 'in_file' is assigned to but never used
diff -ur out_baseline/pre-commit.com.log out_main/pre-commit.com.log
--- out_baseline/pre-commit.com.log 2022-11-21 13:11:30.895877033 -0500
+++ out_main/pre-commit.com.log 2022-11-21 13:12:25.207878302 -0500
@@ -0,0 +1 @@
+./install-local.py:24:5: 'typing.Generator' imported but unused
diff -ur out_baseline/t.log out_main/t.log
--- out_baseline/t.log 2022-11-21 13:11:30.287877019 -0500
+++ out_main/t.log 2022-11-21 13:12:24.795878292 -0500
@@ -0,0 +1 @@
+./2019-07-08-mypy-lateinit/t.py:1:1: 'typing.Optional' imported but unused |
all done! |
Could you explain the reasoning behind this? Is there something I can read that you could point me to? |
I'm also interested in this. Type comments were part of PEP484 and, as far as I'm aware, weren't specifically linked to python 2.x usage (https://peps.python.org/pep-0484/#type-comments). I'd need to go back to our codebase and check again but I think we had some scenarios where annotations didn't work and we needed to use type comments instead. We could just use a |
@SamuilDichev pyflakes is python 3+ only, where type comments are obsolete for type annotations -- there's plans to deprecate them everywhere eventually: https://mail.python.org/archives/list/typing-sig@python.org/thread/66JDHQ2I3U3CPUIYA43W7SPEJLLPUETG/ |
Beginning with version 6 flake8 (or its shipped pyflakes@3) type comments aren't supported anymore. We need to pin the version here because python3.3 doesn't support type annotations in all places anyhow. (Let alone we can't replace them quickly.)
I'm planning to make a new release in the 3 related projects (pyflakes, pycodestyle, flake8) -- mostly to get some major changes in
flake8
outthis will be a major bump here due to removing of
# type: ...
comment parsingThe text was updated successfully, but these errors were encountered: