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
In the very early days of Crappy, some methods were decorated with abc.abstractmethod to clearly signal that they were meant to be overwritten in subclasses. Since then, the decorators were removed (e.g. a72afa1) and it is now possible to instantiate the base classes or their children without redefining the main methods.
It would be nice to prevent the instantiation of the base classes, as they are anyway not usable as is to achieve anything. Their main methods (like the loop method of Block) should also be protected with an abc.abstractmethod decorator, to make sure they are redefined in children classes.
The target objects to refactor will be the Block, Actuator, Camera, InOut, Modifier, Path, CameraProcess, and Overlay. These classes will inherit from abc.ABC, and define at least one abc.abstractmethod.
The text was updated successfully, but these errors were encountered:
In the very early days of Crappy, some methods were decorated with
abc.abstractmethod
to clearly signal that they were meant to be overwritten in subclasses. Since then, the decorators were removed (e.g. a72afa1) and it is now possible to instantiate the base classes or their children without redefining the main methods.It would be nice to prevent the instantiation of the base classes, as they are anyway not usable as is to achieve anything. Their main methods (like the
loop
method ofBlock
) should also be protected with anabc.abstractmethod
decorator, to make sure they are redefined in children classes.The target objects to refactor will be the
Block
,Actuator
,Camera
,InOut
,Modifier
,Path
,CameraProcess
, andOverlay
. These classes will inherit fromabc.ABC
, and define at least oneabc.abstractmethod
.The text was updated successfully, but these errors were encountered: