Open
Description
Currently we use NotImplementedError
to signify methods that are to be overriden by child classes in our class hierarchy. An alternative is to use abstract base classes (ABCs). This also seems to be preferred by many in the community (such as here, here and here). Indeed, perhaps a more reasonable convention should be to use NotImplementedError
would be for methods that are not yet implemented (see here). Some advantages:
- We can't get away without overriding since instantiation will error if the abstract methods are not overridden.
- Again, it's not always clear why the method's not implemented. Marking it as abstract provides the reason.
- All the
raise NotImplementedError
lines should technically be tested for (as they are currently missing from our code coverage), but that would be a little silly.
Metadata
Metadata
Assignees
Labels
No labels
Activity