-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add b024: abstract class with no abstract methods #274
Conversation
e09ad12
to
8e751a7
Compare
Couple possibilities on how liberal the name checks should be to balance false/missed alarms. You can check |
I'd warn only if the name is exactly |
0e28577
to
c307f23
Compare
I was thinking more if any other libraries implement (Previous CI run failed due to me forgetting to update lines after black formatted the test file) |
4100a78
to
4036ee1
Compare
Hmm - Where be the CI? I clicked approve :| |
Stuck in queued, and there's an incident https://www.githubstatus.com/incidents/8gpymn7rystj Should be fine in a few hours? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - thanks @jakkdl!
More details about B024 here PyCQA/flake8-bugbear#274 * ./skywalking/agent/protocol/__init__.py:22:1: B024 Protocol is an abstract base class, but it has no abstract methods. Set 'heartbeat', 'report' and 'report_log' as abstract method * ./skywalking/trace/span.py:36:1: B024 Span is an abstract base class, but it has no abstract methods. Prevent base class Span from being directly instantiated by raising error in __new__ with reference to https://stackoverflow.com/questions/7989042/preventing-a-class-from-direct-instantiation-in-python * ./tests/plugin/base.py:35:1: B024 TestPluginBase is an abstract base class Due to pytest may instantiate parent class for searching test functions, TestPluginBase has to be instantiable.
More details about B024 here PyCQA/flake8-bugbear#274 * ./skywalking/agent/protocol/__init__.py:22:1: B024 Protocol is an abstract base class, but it has no abstract methods. Set 'heartbeat', 'report' and 'report_log' as abstract method * ./skywalking/trace/span.py:36:1: B024 Span is an abstract base class, but it has no abstract methods. Prevent base class Span from being directly instantiated by raising error in __new__ with reference to https://stackoverflow.com/questions/7989042/preventing-a-class-from-direct-instantiation-in-python * ./tests/plugin/base.py:35:1: B024 TestPluginBase is an abstract base class Due to pytest may instantiate parent class for searching test functions, TestPluginBase has to be instantiable.
More details about B024 here PyCQA/flake8-bugbear#274 * ./skywalking/agent/protocol/__init__.py:22:1: B024 Protocol is an abstract base class, but it has no abstract methods. Set 'heartbeat', 'report' and 'report_log' as abstract method * ./skywalking/trace/span.py:36:1: B024 Span is an abstract base class, but it has no abstract methods. Prevent base class Span from being directly instantiated by raising error in __new__ with reference to https://stackoverflow.com/questions/7989042/preventing-a-class-from-direct-instantiation-in-python * ./tests/plugin/base.py:35:1: B024 TestPluginBase is an abstract base class Due to pytest may instantiate parent class for searching test functions, TestPluginBase has to be instantiable.
More details about B024 here PyCQA/flake8-bugbear#274 * ./skywalking/agent/protocol/__init__.py:22:1: B024 Protocol is an abstract base class, but it has no abstract methods. Set 'heartbeat', 'report' and 'report_log' as abstract method * ./skywalking/trace/span.py:36:1: B024 Span is an abstract base class, but it has no abstract methods. Prevent base class Span from being directly instantiated by raising error in __new__ with reference to https://stackoverflow.com/questions/7989042/preventing-a-class-from-direct-instantiation-in-python * ./tests/plugin/base.py:35:1: B024 TestPluginBase is an abstract base class Due to pytest may instantiate parent class for searching test functions, TestPluginBase has to be instantiable.
More details about B024 here PyCQA/flake8-bugbear#274 * ./skywalking/agent/protocol/__init__.py:22:1: B024 Protocol is an abstract base class, but it has no abstract methods. Set 'heartbeat', 'report' and 'report_log' as abstract method * ./skywalking/trace/span.py:36:1: B024 Span is an abstract base class, but it has no abstract methods. Prevent base class Span from being directly instantiated by raising error in __new__ with reference to https://stackoverflow.com/questions/7989042/preventing-a-class-from-direct-instantiation-in-python * ./tests/plugin/base.py:35:1: B024 TestPluginBase is an abstract base class Due to pytest instantiating parent class, TestPluginBase has to be instantiable.
First requested error in #273