diff options
Diffstat (limited to 'pyGHDL')
-rwxr-xr-x | pyGHDL/cli/dom.py | 9 | ||||
-rw-r--r-- | pyGHDL/cli/requirements.txt | 2 | ||||
-rw-r--r-- | pyGHDL/dom/NonStandard.py | 7 | ||||
-rw-r--r-- | pyGHDL/dom/formatting/prettyprint.py | 15 | ||||
-rw-r--r-- | pyGHDL/dom/requirements.txt | 2 | ||||
-rw-r--r-- | pyGHDL/libghdl/requirements.txt | 2 | ||||
-rw-r--r-- | pyGHDL/py.typed | 0 |
7 files changed, 18 insertions, 19 deletions
diff --git a/pyGHDL/cli/dom.py b/pyGHDL/cli/dom.py index 442ad6688..04c23575b 100755 --- a/pyGHDL/cli/dom.py +++ b/pyGHDL/cli/dom.py @@ -114,8 +114,8 @@ class Application(LineTerminal, ArgParseMixin): _design: Design - def __init__(self, debug=False, verbose=False, quiet=False, sphinx=False): - super().__init__(verbose, debug, quiet) + def __init__(self): + super().__init__() # Initialize DOM with an empty design # -------------------------------------------------------------------------- @@ -155,11 +155,6 @@ class Application(LineTerminal, ArgParseMixin): add_help=False, ) - # If executed in Sphinx to auto-document CLI arguments, exit now - # -------------------------------------------------------------------------- - if sphinx: - return - # Change error and warning reporting # -------------------------------------------------------------------------- self._LOG_MESSAGE_FORMAT__[Severity.Fatal] = "{DARK_RED}[FATAL] {message}{NOCOLOR}" diff --git a/pyGHDL/cli/requirements.txt b/pyGHDL/cli/requirements.txt index f24fd4e1c..a2fdd82b3 100644 --- a/pyGHDL/cli/requirements.txt +++ b/pyGHDL/cli/requirements.txt @@ -1,5 +1,5 @@ -r ../dom/requirements.txt -pyTooling>=2.13.0, <3.0 +pyTooling>=4.0.1, <5.0 pyTooling.TerminalUI>=1.5.9 pyAttributes>=2.3.2 diff --git a/pyGHDL/dom/NonStandard.py b/pyGHDL/dom/NonStandard.py index e84396433..31cc28480 100644 --- a/pyGHDL/dom/NonStandard.py +++ b/pyGHDL/dom/NonStandard.py @@ -40,7 +40,7 @@ import time from pathlib import Path from typing import Any -from pyTooling.Decorators import export +from pyTooling.Decorators import export, InheritDocString from pyVHDLModel import VHDLVersion from pyVHDLModel import Design as VHDLModel_Design @@ -85,8 +85,9 @@ from pyGHDL.dom.PSL import VerificationUnit, VerificationProperty, VerificationM @export class Design(VHDLModel_Design): - def __init__(self): - super().__init__() + @InheritDocString(VHDLModel_Design) + def __init__(self, name: str = None): + super().__init__(name) self.__ghdl_init() diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py index 5be27492d..be1d2a511 100644 --- a/pyGHDL/dom/formatting/prettyprint.py +++ b/pyGHDL/dom/formatting/prettyprint.py @@ -144,7 +144,9 @@ class PrettyPrint: buffer.append(f"{prefix} - {package.Identifier} instantiate from {package.PackageReference}") buffer.append(f"{prefix}Entities ({len(library.Entities)}):") for entity in library.Entities.values(): - buffer.append(f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures])})") + buffer.append( + f"{prefix} - {entity.Identifier}({', '.join([a.Identifier for a in entity.Architectures.values()])})" + ) buffer.append(f"{prefix}Configurations ({len(library.Configurations)}):") for configuration in library.Configurations.values(): buffer.append(f"{prefix} - {configuration.Identifier}") @@ -213,7 +215,7 @@ class PrettyPrint: for item in entity.Statements: buffer.append(f"{prefix} ...") buffer.append(f"{prefix} Architectures:") - for item in entity.Architectures: + for item in entity.Architectures.values(): buffer.append(f"{prefix} - {item.Identifier}") return buffer @@ -442,13 +444,14 @@ class PrettyPrint: def formatSubtypeIndication(self, subtypeIndication, entity: str, name: str) -> str: if isinstance(subtypeIndication, SimpleSubtypeSymbol): - return f"{subtypeIndication.SymbolName}" + return f"{subtypeIndication.Identifier}" elif isinstance(subtypeIndication, ConstrainedCompositeSubtypeSymbol): constraints = [] - for constraint in subtypeIndication.Constraints: - constraints.append(str(constraint)) + # FIXME: disabled due to problems with symbols + # for constraint in subtypeIndication.Constraints: + # constraints.append(str(constraint)) - return f"{subtypeIndication.SymbolName}({', '.join(constraints)})" + return f"{subtypeIndication.Identifier}({', '.join(constraints)})" else: raise PrettyPrintException( f"Unhandled subtype kind '{subtypeIndication.__class__.__name__}' for {entity} '{name}'." diff --git a/pyGHDL/dom/requirements.txt b/pyGHDL/dom/requirements.txt index 01862686c..dcded04a0 100644 --- a/pyGHDL/dom/requirements.txt +++ b/pyGHDL/dom/requirements.txt @@ -1,4 +1,4 @@ -r ../libghdl/requirements.txt -pyVHDLModel==0.23.0 +pyVHDLModel==0.24.1 #https://github.com/VHDL/pyVHDLModel/archive/dev.zip#pyVHDLModel diff --git a/pyGHDL/libghdl/requirements.txt b/pyGHDL/libghdl/requirements.txt index a061bb3f4..c66bc6e3a 100644 --- a/pyGHDL/libghdl/requirements.txt +++ b/pyGHDL/libghdl/requirements.txt @@ -1 +1 @@ -pyTooling>=2.13.0, <3.0 +pyTooling>=4.0.1, <5.0 diff --git a/pyGHDL/py.typed b/pyGHDL/py.typed new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/pyGHDL/py.typed |