From b9e0c6eb50e870f569602b4013e1c59cbe72bf2c Mon Sep 17 00:00:00 2001
From: Anthony Sottile <asottile@umich.edu>
Date: Sat, 30 Jul 2022 13:35:02 -0400
Subject: [PATCH] upgrade pyflakes to 2.5.x

---
 docs/source/user/configuration.rst | 5 +----
 docs/source/user/error-codes.rst   | 2 --
 setup.cfg                          | 2 +-
 src/flake8/plugins/pyflakes.py     | 2 --
 4 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/docs/source/user/configuration.rst b/docs/source/user/configuration.rst
index f26674b6..eca2667e 100644
--- a/docs/source/user/configuration.rst
+++ b/docs/source/user/configuration.rst
@@ -180,7 +180,6 @@ look at a portion of a project's Flake8 configuration in their ``tox.ini``:
 
     [flake8]
     # it's not a bug that we aren't using all of hacking, ignore:
-    # F812: list comprehension redefines ...
     # H101: Use TODO(NAME)
     # H202: assertRaises Exception too broad
     # H233: Python 3.x incompatible use of print operator
@@ -191,7 +190,7 @@ look at a portion of a project's Flake8 configuration in their ``tox.ini``:
     # H404: multi line docstring should start without a leading new line
     # H405: multi line docstring summary not separated with an empty line
     # H501: Do not use self.__dict__ for string formatting
-    ignore = F812,H101,H202,H233,H301,H306,H401,H403,H404,H405,H501
+    ignore = H101,H202,H233,H301,H306,H401,H403,H404,H405,H501
 
 They use the comments to describe the check but they could also write this as:
 
@@ -200,8 +199,6 @@ They use the comments to describe the check but they could also write this as:
     [flake8]
     # it's not a bug that we aren't using all of hacking
     ignore =
-        # F812: list comprehension redefines ...
-        F812,
         # H101: Use TODO(NAME)
         H101,
         # H202: assertRaises Exception too broad
diff --git a/docs/source/user/error-codes.rst b/docs/source/user/error-codes.rst
index 9eab3f7a..d12a07fa 100644
--- a/docs/source/user/error-codes.rst
+++ b/docs/source/user/error-codes.rst
@@ -85,8 +85,6 @@ generates its own :term:`error code`\ s for ``pyflakes``:
 +------+---------------------------------------------------------------------+
 | F704 | a ``yield`` or ``yield from`` statement outside of a function       |
 +------+---------------------------------------------------------------------+
-| F705 | a ``return`` statement with arguments inside a generator            |
-+------+---------------------------------------------------------------------+
 | F706 | a ``return`` statement outside of a function/method                 |
 +------+---------------------------------------------------------------------+
 | F707 | an ``except:`` block as not the last exception handler              |
diff --git a/setup.cfg b/setup.cfg
index acb152ac..4e273514 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -41,7 +41,7 @@ package_dir =
 install_requires =
     mccabe>=0.7.0,<0.8.0
     pycodestyle>=2.8.0,<2.9.0
-    pyflakes>=2.4.0,<2.5.0
+    pyflakes>=2.5.0,<2.6.0
     importlib-metadata<4.3;python_version<"3.8"
 python_requires = >=3.6.1
 
diff --git a/src/flake8/plugins/pyflakes.py b/src/flake8/plugins/pyflakes.py
index dc8a02e7..54eaeca5 100644
--- a/src/flake8/plugins/pyflakes.py
+++ b/src/flake8/plugins/pyflakes.py
@@ -49,14 +49,12 @@
     "ContinueOutsideLoop": "F702",
     "ContinueInFinally": "F703",
     "YieldOutsideFunction": "F704",
-    "ReturnWithArgsInsideGenerator": "F705",
     "ReturnOutsideFunction": "F706",
     "DefaultExceptNotLast": "F707",
     "DoctestSyntaxError": "F721",
     "ForwardAnnotationSyntaxError": "F722",
     "CommentAnnotationSyntaxError": "F723",
     "RedefinedWhileUnused": "F811",
-    "RedefinedInListComp": "F812",
     "UndefinedName": "F821",
     "UndefinedExport": "F822",
     "UndefinedLocal": "F823",