From 5314281f0b8090f820ae64b652e40c300c2bdec2 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Fri, 30 Jul 2021 23:55:18 +0200 Subject: Fixes. --- pyGHDL/cli/dom.py | 7 +++---- pyGHDL/dom/Object.py | 28 ++++++++++++++-------------- pyGHDL/dom/formatting/prettyprint.py | 3 ++- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/pyGHDL/cli/dom.py b/pyGHDL/cli/dom.py index 83ef7c42e..63350d729 100755 --- a/pyGHDL/cli/dom.py +++ b/pyGHDL/cli/dom.py @@ -297,7 +297,7 @@ class Application(LineTerminal, ArgParseMixin): ) ) elif args.Directory is not None: - d : Path = args.Directory + d: Path = args.Directory if not d.exists(): self.WriteError("Directory '{0!s}' does not exist.".format(d)) @@ -311,12 +311,11 @@ class Application(LineTerminal, ArgParseMixin): DOM translation time: {:5.3f} us """ ).format( - document.LibGHDLProcessingTime * 10**6, - document.DOMTranslationTime * 10**6, + document.LibGHDLProcessingTime * 10 ** 6, + document.DOMTranslationTime * 10 ** 6, ) ) - PP = PrettyPrint() buffer = [] diff --git a/pyGHDL/dom/Object.py b/pyGHDL/dom/Object.py index b14d0094c..b83f352a4 100644 --- a/pyGHDL/dom/Object.py +++ b/pyGHDL/dom/Object.py @@ -80,18 +80,18 @@ class Constant(VHDLModel_Constant, DOMMixin): return cls( constantNode, - list( + [ name, - ), + ], subtypeIndication, defaultExpression, ) else: return DeferredConstant( constantNode, - list( + [ name, - ), + ], subtypeIndication, ) @@ -113,9 +113,9 @@ class DeferredConstant(VHDLModel_DeferredConstant, DOMMixin): return cls( constantNode, - list( + [ name, - ), + ], subtypeIndication, ) @@ -148,9 +148,9 @@ class Variable(VHDLModel_Variable, DOMMixin): return cls( variableNode, - list( + [ name, - ), + ], subtypeIndication, defaultExpression, ) @@ -171,9 +171,9 @@ class SharedVariable(VHDLModel_SharedVariable, DOMMixin): return cls( variableNode, - list( + [ name, - ), + ], subtypeIndication, ) @@ -204,9 +204,9 @@ class Signal(VHDLModel_Signal, DOMMixin): return cls( signalNode, - list( + [ name, - ), + ], subtypeIndication, defaultExpression, ) @@ -229,8 +229,8 @@ class File(VHDLModel_File, DOMMixin): return cls( fileNode, - list( + [ name, - ), + ], subtypeIndication, ) diff --git a/pyGHDL/dom/formatting/prettyprint.py b/pyGHDL/dom/formatting/prettyprint.py index 8ab854212..a30258443 100644 --- a/pyGHDL/dom/formatting/prettyprint.py +++ b/pyGHDL/dom/formatting/prettyprint.py @@ -41,7 +41,8 @@ from pyVHDLModel.SyntaxModel import ( WithDefaultExpressionMixin, Function, BaseType, - FullType, BaseConstant, + FullType, + BaseConstant, ) from pyGHDL import GHDLBaseException -- cgit v1.2.3