-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Taking the example from https://docs.astral.sh/ruff/rules/abstract-base-class-without-abstract-method/
from abc import ABC
class Foo(ABC):
def method(self):
bar()B024 detects it as expected:
$ ruff --version
ruff 0.4.2
$ ruff check --isolated --select B024 abc.py
abc.py:4:7: B024 `Foo` is an abstract base class, but it has no abstract methods
Found 1 error.
$But if I add a simple class var, now it passes:
from abc import ABC
class Foo(ABC):
BAR = 1
def method(self):
bar()$ ruff check --isolated --select B024 abc.py
All checks passed!Is that expected?
Playground: https://play.ruff.rs/f0b51911-407f-4bd7-af7c-c9f5b1116677
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule