Skip to content

Commit 07eb8ae

Browse files
authored
Merge pull request #2054 from PyCQA/latest-pyflakes
update to latest pyflakes
2 parents 2436eab + a9e6dc2 commit 07eb8ae

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎docs/source/user/error-codes.rst‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ generates its own :term:`error code`\ s for ``pyflakes``:
8989
+------+---------------------------------------------------------------------+
9090
| F707 | an ``except:`` block as not the last exception handler |
9191
+------+---------------------------------------------------------------------+
92+
| F708 | ``lazy`` import must be at module scope |
93+
+------+---------------------------------------------------------------------+
94+
| F709 | ``lazy from ... import *`` is not allowed |
95+
+------+---------------------------------------------------------------------+
9296
| F721 | syntax error in doctest |
9397
+------+---------------------------------------------------------------------+
9498
| F722 | syntax error in forward annotation |
@@ -111,6 +115,8 @@ generates its own :term:`error code`\ s for ``pyflakes``:
111115
+------+---------------------------------------------------------------------+
112116
| F842 | local variable ``name`` is annotated but never used |
113117
+------+---------------------------------------------------------------------+
118+
| F851 | eager use of lazily imported ``name`` from line ``N`` |
119+
+------+---------------------------------------------------------------------+
114120
+------+---------------------------------------------------------------------+
115121
| F901 | ``raise NotImplemented`` should be ``raise NotImplementedError`` |
116122
+------+---------------------------------------------------------------------+

‎setup.cfg‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ packages = find:
2929
install_requires =
3030
mccabe>=0.7.0,<0.8.0
3131
pycodestyle>=2.15.0,<2.16.0
32-
pyflakes>=3.4.0,<3.5.0
32+
pyflakes>=4.0.0,<4.1.0
3333
python_requires = >=3.10
3434
package_dir =
3535
=src

‎src/flake8/plugins/pyflakes.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050
"YieldOutsideFunction": "F704",
5151
"ReturnOutsideFunction": "F706",
5252
"DefaultExceptNotLast": "F707",
53+
"LazyImportNotAtModuleScope": "F708",
54+
"LazyImportStarNotPermitted": "F709",
5355
"DoctestSyntaxError": "F721",
5456
"ForwardAnnotationSyntaxError": "F722",
5557
"RedefinedWhileUnused": "F811",
@@ -60,6 +62,7 @@
6062
"DuplicateArgument": "F831",
6163
"UnusedVariable": "F841",
6264
"UnusedAnnotation": "F842",
65+
"EagerUseOfLazyImport": "F851",
6366
"RaiseNotImplemented": "F901",
6467
}
6568

0 commit comments

Comments
 (0)