-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Description
Hey! A new release (with #273 included) raises an error
Injectable is an abstract base class, but it has no abstract methods. Remember to use @ abstractmethod, @abstractclassmethod and/or @abstractproperty decorators.
I think that's fine to use ABC without abstractmethods/etc., because that's not the only thing ABCs do. They also allow to register other classes as being subclasses of the base class - see example at https://docs.python.org/3/library/abc.html#abc.ABCMeta.register.
This is how ABC is used in our project (see https://github.com/scrapinghub/web-poet/blob/944dcd75f6c56988d42c56c56adb1b3dcafa2dbd/web_poet/pages.py#L11); a new flake8-bugbear release flags it as an error.
felipeboffnunes, heylouiz, AdmiralGT, barney-ellis, sabishvetsova and 5 more
Metadata
Metadata
Assignees
Labels
No labels