lava
lava copied to clipboard
AbstractRunCondition is not implemented as an abstract class, refactor blocking as abstract property.
Objective of issue: Refactor AbstractRunCondition into an actual abstract class.
Lava version:
- [ ] 0.3.0 (feature release)
- [ ] 0.2.1 (bug fixes)
- [x] 0.2.0 (current version)
- [ ] 0.1.2
I'm submitting a ...
- [x] bug report
- [ ] feature request
- [ ] documentation request
Current behavior:
- AbstractRuncondition does not have any abstract method, this means that instantiation is allowed. In particular, the blocking attribute is set on the abstract class constructor, then subclasses pass it into super's constructor.
Expected behavior:
- AbstractRunCondition should have at least one abstract method, this can be achieved by refactoring blocking as an abstract property which the subclasses should define.
Steps to reproduce:
- Import AbstractRunCondition from lava.magma.core.run_conditions
- instantiate AbstractRunCondition, e.g.:
- my_condition = AbstractRunCondition(blocking=True)
- this should not be allowed. I would expect a TypeError to be raised.
Related code:
insert short code snippets here
Other information:
insert the output from lava debug here