You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of the BAR = 1 declaration, B024 is considering Foo an ABC, but it isn't.
Expected:
$ flake8 --isolated --select B024 abc.py
abc.py:4:1: B024 Foo is an abstract base class, but none of the methods it defines are abstract. This is not necessarily an error, but you might have forgotten to add the @abstractmethod decorator, potentially in conjunction with @classmethod, @property and/or @staticmethod.
$
But got:
$ flake8 --isolated --select B024 abc.py
$
Info:
$ flake8 --version
7.0.0 (flake8-bugbear: 24.4.26, mccabe: 0.7.0, pycodestyle: 2.11.1, pyflakes: 3.2.0) CPython 3.12.2 on Darwin
Because of the
BAR = 1
declaration, B024 is consideringFoo
an ABC, but it isn't.Expected:
But got:
Info:
This looks related to the fix for #293.
If I comment out this code, it works as expected:
flake8-bugbear/bugbear.py
Lines 925 to 929 in d1aec4c
By the way, this same issue was reported to ruff in astral-sh/ruff#11208 and they got a fix. Maybe here a similar patch would work?
The text was updated successfully, but these errors were encountered: