Skip to content

Commit

Permalink
Merge branch 'pyflakes_new_codes' into 'master'
Browse files Browse the repository at this point in the history
Update to pyflakes 2.0.0

Closes #422

See merge request pycqa/flake8!239
  • Loading branch information
sigmavirus24 committed Jun 29, 2018
2 parents e60e802 + 527af5c commit eb6228b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/source/user/error-codes.rst
Expand Up @@ -54,6 +54,9 @@ generates its own :term:`error code`\ s for ``pyflakes``:
+------+---------------------------------------------------------------------+
| F707 | an ``except:`` block as not the last exception handler |
+------+---------------------------------------------------------------------+
| F721 | doctest syntax error |
| F722 | syntax error in forward type annotation |
+------+---------------------------------------------------------------------+
+------+---------------------------------------------------------------------+
| F811 | redefinition of unused ``name`` from line ``N`` |
+------+---------------------------------------------------------------------+
Expand All @@ -69,6 +72,9 @@ generates its own :term:`error code`\ s for ``pyflakes``:
+------+---------------------------------------------------------------------+
| F841 | local variable ``name`` is assigned to but never used |
+------+---------------------------------------------------------------------+
+------+---------------------------------------------------------------------+
| F901 | ``raise NotImplemented`` should be ``raise NotImplementedError`` |
+------+---------------------------------------------------------------------+

Note that some of these entries behave differently on Python 2 and Python 3,
for example F812 is specific to Python 2 only.
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -13,6 +13,6 @@ license_file = LICENSE
requires-dist =
enum34; python_version<"3.4"
configparser; python_version<"3.2"
pyflakes >= 1.5.0, < 1.7.0
pyflakes >= 2.0.0, < 2.1.0
pycodestyle >= 2.4.0, < 2.5.0
mccabe >= 0.6.0, < 0.7.0
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -21,7 +21,7 @@
# http://flake8.pycqa.org/en/latest/faq.html#why-does-flake8-use-ranges-for-its-dependencies
# And in which releases we will update those ranges here:
# http://flake8.pycqa.org/en/latest/internal/releases.html#releasing-flake8
"pyflakes >= 1.5.0, < 1.7.0",
"pyflakes >= 2.0.0, < 2.1.0",
"pycodestyle >= 2.4.0, < 2.5.0",
"mccabe >= 0.6.0, < 0.7.0",
"setuptools >= 30",
Expand Down
2 changes: 2 additions & 0 deletions src/flake8/plugins/pyflakes.py
Expand Up @@ -38,13 +38,15 @@
'ReturnOutsideFunction': 'F706',
'DefaultExceptNotLast': 'F707',
'DoctestSyntaxError': 'F721',
'ForwardAnnotationSyntaxError': 'F722',
'RedefinedWhileUnused': 'F811',
'RedefinedInListComp': 'F812',
'UndefinedName': 'F821',
'UndefinedExport': 'F822',
'UndefinedLocal': 'F823',
'DuplicateArgument': 'F831',
'UnusedVariable': 'F841',
'RaiseNotImplemented': 'F901',
}


Expand Down

0 comments on commit eb6228b

Please sign in to comment.