In Python 3.7.4, with Flake8 3.7.8, Entrypoints 0.3, McCabe 0.6.1, PyCodeStyle 2.1.1, and PyFlakes 2.1.1, the following code snippet is determined to be "clean" by flake8:
def foo(self):
pass
@when('condition') # noqa: F811
def foo(self):
pass
However, in Python 3.8.0, with the same versions of Flake8 and friends, it raises:
[F811] redefinition of unused 'foo'
If I instead change the above snippet to:
def foo(self):
pass
@when('condition')
def foo(self): # noqa: F811
pass
flake8 is happy again. Is this a known change in the behavior of PyFlakes/Flake8, or is this a bug somewhere? I saw #482 but I think that's specific to the builtin @overload decorator.
In Python 3.7.4, with Flake8 3.7.8, Entrypoints 0.3, McCabe 0.6.1, PyCodeStyle 2.1.1, and PyFlakes 2.1.1, the following code snippet is determined to be "clean" by flake8:
However, in Python 3.8.0, with the same versions of Flake8 and friends, it raises:
If I instead change the above snippet to:
flake8 is happy again. Is this a known change in the behavior of PyFlakes/Flake8, or is this a bug somewhere? I saw #482 but I think that's specific to the builtin
@overloaddecorator.