-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
In __init__.py
, the DesignUnit
class is imported from the DesignUnit
file and retains its name.
As a result, it overwrites the DesignUnit
module.
So, the following causes an error:
import pyVHDLModel
class LibraryClause(pyVHDLModel.DesignUnit.LibraryClause):
...
class LibraryClause(pyVHDLModel.DesignUnit.LibraryClause):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E AttributeError: type object 'DesignUnit' has no attribute 'LibraryClause'
This is because type(pyVHDLModel.DesignUnit) == <class DesignUnit>
.
You have to do a from ... import
to avoid this issue:
from pyVHDLModel.DesignUnit import LibraryClause as BaseLibraryClause
class LibraryClause(BaseLibraryClause):
...
Metadata
Metadata
Assignees
Labels
No labels