import-linter icon indicating copy to clipboard operation
import-linter copied to clipboard

Custom contract types don't inherit fields

Open seddonym opened this issue 6 years ago • 0 comments

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

seddonym avatar May 17 '19 11:05 seddonym