aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/cli/dom.py
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-07-01 00:39:04 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-07-01 06:44:56 +0200
commitc7f0d0792dfb45e9fd6b7cdcb3ab0c208b7b6d07 (patch)
treeb07237a89aa2a7f7b45ea025b20786d066032425 /pyGHDL/cli/dom.py
parent8b3112098ea7f81baedea06bc5060be8db0bc13d (diff)
downloadghdl-c7f0d0792dfb45e9fd6b7cdcb3ab0c208b7b6d07.tar.gz
ghdl-c7f0d0792dfb45e9fd6b7cdcb3ab0c208b7b6d07.tar.bz2
ghdl-c7f0d0792dfb45e9fd6b7cdcb3ab0c208b7b6d07.zip
Fixed text indentations.
(cherry picked from commit 2dc7659fc1a8300ccf1a414c742beb15bffd6f1d)
Diffstat (limited to 'pyGHDL/cli/dom.py')
-rwxr-xr-xpyGHDL/cli/dom.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/pyGHDL/cli/dom.py b/pyGHDL/cli/dom.py
index 0638bb2e6..a50a69b12 100755
--- a/pyGHDL/cli/dom.py
+++ b/pyGHDL/cli/dom.py
@@ -130,18 +130,18 @@ class Application(LineTerminal, ArgParseMixin):
# Call the constructor of the ArgParseMixin
# --------------------------------------------------------------------------
- textWidth = min(self.Width, 160)
+ textWidth = min(max(self.Width, 80), 160)
description = dedent(
"""\
- Application to test pyGHDL's DOM API.
- """
+ Application to test pyGHDL's DOM API.
+ """
)
epilog = "\n".join(
wrap(
dedent(
"""\
- pyGHDL is a Python binding for libghdl.
- """
+ pyGHDL is a Python binding for libghdl.
+ """
),
textWidth,
replace_whitespace=False,
@@ -188,9 +188,9 @@ class Application(LineTerminal, ArgParseMixin):
self.WriteNormal(
dedent(
"""\
- {HEADLINE}{line}
- {headline: ^80s}
- {line}"""
+ {HEADLINE}{line}
+ {headline: ^80s}
+ {line}"""
).format(line="=" * 80, headline=self.HeadLine, **LineTerminal.Foreground)
)
@@ -281,15 +281,16 @@ class Application(LineTerminal, ArgParseMixin):
for file in args.Files:
if not file.exists():
self.WriteError("File '{0!s}' does not exist.".format(file))
+ continue
self.WriteNormal("Parsing file '{!s}'".format(file))
document = self.addFile(file, "pretty")
self.WriteInfo(
dedent(
"""\
- libghdl processing time: {: 5.3f} us
- DOM translation time: {:5.3f} us
- """
+ libghdl processing time: {: 5.3f} us
+ DOM translation time: {:5.3f} us
+ """
).format(
document.LibGHDLProcessingTime * 10 ** 6,
document.DOMTranslationTime * 10 ** 6,