import-linter
import-linter copied to clipboard
Custom contract types don't inherit fields
As per bug reported https://github.com/seddonym/import-linter/issues/44.
If you just subclass a contract, you get the following error when running the linter:
'ListField' object is not iterable
The workaround is to redeclare the fields:
class CustomLayersContract(LayersContract):
containers = LayersContract.containers
layers = LayersContract.layers
ignore_imports = LayersContract.ignore_imports