diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-08-13 22:36:41 +0200 |
---|---|---|
committer | umarcor <unai.martinezcorral@ehu.eus> | 2021-08-23 16:35:35 +0200 |
commit | edd59b8997c30c8a559d4d7d433631ef03c19546 (patch) | |
tree | 2e1acc036fddd73140650c69e9e054d85abbb608 /pyGHDL/dom | |
parent | c4326161ce97d3286e8dffe31d0c168e05f3f9ea (diff) | |
download | ghdl-edd59b8997c30c8a559d4d7d433631ef03c19546.tar.gz ghdl-edd59b8997c30c8a559d4d7d433631ef03c19546.tar.bz2 ghdl-edd59b8997c30c8a559d4d7d433631ef03c19546.zip |
Black formatting.
Diffstat (limited to 'pyGHDL/dom')
-rw-r--r-- | pyGHDL/dom/Concurrent.py | 24 | ||||
-rw-r--r-- | pyGHDL/dom/Expression.py | 4 | ||||
-rw-r--r-- | pyGHDL/dom/NonStandard.py | 4 | ||||
-rw-r--r-- | pyGHDL/dom/Sequential.py | 13 | ||||
-rw-r--r-- | pyGHDL/dom/_Translate.py | 19 |
5 files changed, 40 insertions, 24 deletions
diff --git a/pyGHDL/dom/Concurrent.py b/pyGHDL/dom/Concurrent.py index de4e70539..685d02287 100644 --- a/pyGHDL/dom/Concurrent.py +++ b/pyGHDL/dom/Concurrent.py @@ -196,10 +196,14 @@ class ProcessStatement(VHDLModel_ProcessStatement, DOMMixin): sensitivityList = None if hasSensitivityList: sensitivityListNode = nodes.Get_Sensitivity_List(processNode) - print("sensi", GetIirKindOfNode(sensitivityListNode)) + # print("sensi", GetIirKindOfNode(sensitivityListNode)) - declaredItems = GetDeclaredItemsFromChainedNodes(nodes.Get_Declaration_Chain(processNode), "process", label) - statements = GetSequentialStatementsFromChainedNodes(nodes.Get_Sequential_Statement_Chain(processNode), "process", label) + declaredItems = GetDeclaredItemsFromChainedNodes( + nodes.Get_Declaration_Chain(processNode), "process", label + ) + statements = GetSequentialStatementsFromChainedNodes( + nodes.Get_Sequential_Statement_Chain(processNode), "process", label + ) return cls(processNode, label, declaredItems, statements, sensitivityList) @@ -372,10 +376,14 @@ class RangedGenerateChoice(VHDLModel_RangedGenerateChoice, DOMMixin): @export class GenerateCase(VHDLModel_GenerateCase, DOMMixin): - def __init__(self, node: Iir, choices: Iterable[ConcurrentChoice], + def __init__( + self, + node: Iir, + choices: Iterable[ConcurrentChoice], declaredItems: Iterable = None, statements: Iterable[ConcurrentStatement] = None, - alternativeLabel: str = None,): + alternativeLabel: str = None, + ): super().__init__(choices) DOMMixin.__init__(self, node) @@ -447,7 +455,11 @@ class OthersGenerateCase(VHDLModel_OthersGenerateCase, DOMMixin): @export class CaseGenerateStatement(VHDLModel_CaseGenerateStatement, DOMMixin): def __init__( - self, generateNode: Iir, label: str, expression: Expression, cases: Iterable[ConcurrentCase] + self, + generateNode: Iir, + label: str, + expression: Expression, + cases: Iterable[ConcurrentCase], ): super().__init__(label, expression, cases) DOMMixin.__init__(self, generateNode) diff --git a/pyGHDL/dom/Expression.py b/pyGHDL/dom/Expression.py index 3b871f7dd..e8488b590 100644 --- a/pyGHDL/dom/Expression.py +++ b/pyGHDL/dom/Expression.py @@ -597,8 +597,8 @@ class Aggregate(VHDLModel_Aggregate, DOMMixin): choices.append(OthersAggregateElement(item, value)) else: raise DOMException( - "Unknown choice kind '{kindName}'({kind}) in aggregate '{aggr}'.".format( - kind=kind, kindName=kind.name, aggr=node + "Unknown choice kind '{kind}' in aggregate '{aggr}'.".format( + kind=kind.name, aggr=node ) ) diff --git a/pyGHDL/dom/NonStandard.py b/pyGHDL/dom/NonStandard.py index 41f58732f..fe199d58e 100644 --- a/pyGHDL/dom/NonStandard.py +++ b/pyGHDL/dom/NonStandard.py @@ -213,9 +213,7 @@ class Document(VHDLModel_Document): else: raise DOMException( - "Unknown design unit kind '{kindName}'({kind}).".format( - kindName=nodeKind.name, kind=nodeKind - ) + "Unknown design unit kind '{kind}'.".format(kind=nodeKind.name) ) @property diff --git a/pyGHDL/dom/Sequential.py b/pyGHDL/dom/Sequential.py index cc5a58d15..47caf3c3b 100644 --- a/pyGHDL/dom/Sequential.py +++ b/pyGHDL/dom/Sequential.py @@ -198,7 +198,12 @@ class RangedChoice(VHDLModel_RangedChoice, DOMMixin): @export class Case(VHDLModel_Case, DOMMixin): - def __init__(self, node: Iir, choices: Iterable[SequentialChoice], statements: Iterable[SequentialStatement]): + def __init__( + self, + node: Iir, + choices: Iterable[SequentialChoice], + statements: Iterable[SequentialStatement], + ): super().__init__(choices, statements) DOMMixin.__init__(self, node) @@ -251,7 +256,11 @@ class OthersCase(VHDLModel_OthersCase, DOMMixin): @export class CaseStatement(VHDLModel_CaseStatement, DOMMixin): def __init__( - self, generateNode: Iir, label: str, expression: Expression, cases: Iterable[SequentialCase] + self, + generateNode: Iir, + label: str, + expression: Expression, + cases: Iterable[SequentialCase], ): super().__init__(expression, cases, label) DOMMixin.__init__(self, generateNode) diff --git a/pyGHDL/dom/_Translate.py b/pyGHDL/dom/_Translate.py index 6e3a95ea7..a6ad1ca42 100644 --- a/pyGHDL/dom/_Translate.py +++ b/pyGHDL/dom/_Translate.py @@ -200,8 +200,8 @@ def GetAssociations(node: Iir) -> List: associations.append(expr) else: raise DOMException( - "Unknown association kind '{kindName}'({kind}) in array index/slice or function call '{node}'.".format( - kind=kind, kindName=kind.name, node=node + "Unknown association kind '{kind}' in array index/slice or function call '{node}'.".format( + kind=kind.name, node=node ) ) @@ -526,9 +526,8 @@ def GetGenericsFromChainedNodes( else: position = Position.parse(generic) raise DOMException( - "Unknown generic kind '{kindName}'({kind}) in generic '{generic}' at {file}:{line}:{column}.".format( - kind=kind, - kindName=kind.name, + "Unknown generic kind '{kind}' in generic '{generic}' at {file}:{line}:{column}.".format( + kind=kind.name, generic=generic, file=position.Filename, line=position.Line, @@ -577,9 +576,8 @@ def GetPortsFromChainedNodes( else: position = Position.parse(port) raise DOMException( - "Unknown port kind '{kindName}'({kind}) in port '{port}' at {file}:{line}:{column}.".format( - kind=kind, - kindName=kind.name, + "Unknown port kind '{kind}' in port '{port}' at {file}:{line}:{column}.".format( + kind=kind.name, port=port, file=position.Filename, line=position.Line, @@ -615,9 +613,8 @@ def GetParameterFromChainedNodes( else: position = Position.parse(parameter) raise DOMException( - "Unknown parameter kind '{kindName}'({kind}) in parameter '{param}' at {file}:{line}:{column}.".format( - kind=kind, - kindName=kind.name, + "Unknown parameter kind '{kind}' in parameter '{param}' at {file}:{line}:{column}.".format( + kind=kind.name, param=parameter, file=position.Filename, line=position.Line, |