diff options
author | Xiretza <xiretza@xiretza.xyz> | 2021-02-10 19:17:23 +0100 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2021-02-10 21:36:22 +0100 |
commit | d52693df5bc7480c3917b7248f8602f2942aeab7 (patch) | |
tree | 6404e02d6f053a6b53c561c6b60a6a54152a9e63 /pyGHDL/dom/Common.py | |
parent | 8f563f9df8ad94e44f1bd8eecd91d5611e507cc7 (diff) | |
download | ghdl-d52693df5bc7480c3917b7248f8602f2942aeab7.tar.gz ghdl-d52693df5bc7480c3917b7248f8602f2942aeab7.tar.bz2 ghdl-d52693df5bc7480c3917b7248f8602f2942aeab7.zip |
pyGHDL: format using black
Diffstat (limited to 'pyGHDL/dom/Common.py')
-rw-r--r-- | pyGHDL/dom/Common.py | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/pyGHDL/dom/Common.py b/pyGHDL/dom/Common.py index 1b52da181..646e074e5 100644 --- a/pyGHDL/dom/Common.py +++ b/pyGHDL/dom/Common.py @@ -39,46 +39,46 @@ from pydecor import export from pyVHDLModel.VHDLModel import Mode -from pyGHDL.libghdl import name_table -from pyGHDL.libghdl.vhdl import nodes +from pyGHDL.libghdl import name_table +from pyGHDL.libghdl.vhdl import nodes __all__ = [] @export class GHDLBaseException(Exception): - pass + pass @export class LibGHDLException(GHDLBaseException): - pass + pass @export class GHDLException(GHDLBaseException): - pass + pass @export class GHDLMixin: - _MODE_TRANSLATION = { - nodes.Iir_Mode.In_Mode: Mode.In, - nodes.Iir_Mode.Out_Mode: Mode.Out, - nodes.Iir_Mode.Inout_Mode: Mode.InOut, - nodes.Iir_Mode.Buffer_Mode: Mode.Buffer, - nodes.Iir_Mode.Linkage_Mode: Mode.Linkage - } + _MODE_TRANSLATION = { + nodes.Iir_Mode.In_Mode: Mode.In, + nodes.Iir_Mode.Out_Mode: Mode.Out, + nodes.Iir_Mode.Inout_Mode: Mode.InOut, + nodes.Iir_Mode.Buffer_Mode: Mode.Buffer, + nodes.Iir_Mode.Linkage_Mode: Mode.Linkage, + } - @classmethod - def _ghdlNodeToName(cls, node) -> str: - """Return the python string from node :obj:`node` identifier""" - return name_table.Get_Name_Ptr(nodes.Get_Identifier(node)) + @classmethod + def _ghdlNodeToName(cls, node) -> str: + """Return the python string from node :obj:`node` identifier""" + return name_table.Get_Name_Ptr(nodes.Get_Identifier(node)) - @classmethod - def _ghdlPortToMode(cls, port): - """Return the mode of a :obj:`port`.""" - try: - return cls._MODE_TRANSLATION[nodes.Get_Mode(port)] - except KeyError: - raise LibGHDLException("Unknown mode.") + @classmethod + def _ghdlPortToMode(cls, port): + """Return the mode of a :obj:`port`.""" + try: + return cls._MODE_TRANSLATION[nodes.Get_Mode(port)] + except KeyError: + raise LibGHDLException("Unknown mode.") |