|
33 | 33 | |
34 | 34 | __copyright__ = "2007-2022, Patrick Lehmann" |
35 | 35 | __license__ = "Apache License, Version 2.0" |
36 | | -__version__ = "1.5.7" |
| 36 | +__version__ = "1.5.8" |
37 | 37 | __keywords__ = ["terminal", "shell", "text user interface", "TUI", "console", "message logging"] |
38 | 38 |
|
39 | 39 | from enum import Enum, unique |
40 | 40 | from platform import system as platform_system |
41 | 41 | from typing import NoReturn, Tuple, Any |
42 | 42 |
|
43 | 43 | from pyTooling.Decorators import export |
44 | | -from pyTooling.MetaClasses import Singleton |
| 44 | +from pyTooling.MetaClasses import ExtendedType |
45 | 45 |
|
46 | 46 |
|
47 | 47 | @export |
@@ -97,7 +97,7 @@ class Terminal: |
97 | 97 | _width : int = None #: Terminal width in characters |
98 | 98 | _height : int = None #: Terminal height in characters |
99 | 99 |
|
100 | | - def __init__(self) -> None: |
| 100 | + def __init__(self): |
101 | 101 | """ |
102 | 102 | Initialize a terminal. |
103 | 103 |
|
@@ -390,7 +390,7 @@ class Line: |
390 | 390 | Severity.DryRun: "DRYRUN: {message}" |
391 | 391 | } #: Terminal messages formatting rules |
392 | 392 |
|
393 | | - def __init__(self, message, severity=Severity.Normal, indent=0, appendLinebreak=True) -> None: |
| 393 | + def __init__(self, message, severity=Severity.Normal, indent=0, appendLinebreak=True): |
394 | 394 | """Constructor for a new ``Line`` object.""" |
395 | 395 | self._severity = severity |
396 | 396 | self._message = message |
@@ -428,7 +428,7 @@ class ILineTerminal: |
428 | 428 |
|
429 | 429 | _terminal = None |
430 | 430 |
|
431 | | - def __init__(self, terminal=None) -> None: |
| 431 | + def __init__(self, terminal=None): |
432 | 432 | """MixIn initializer.""" |
433 | 433 | self._terminal = terminal |
434 | 434 |
|
@@ -506,8 +506,8 @@ def WriteDryRun(self, *args, condition=True, **kwargs): |
506 | 506 |
|
507 | 507 |
|
508 | 508 | @export |
509 | | -class LineTerminal(Terminal, ILineTerminal, metaclass=Singleton): |
510 | | - def __init__(self, verbose=False, debug=False, quiet=False, writeToStdOut=True) -> None: |
| 509 | +class LineTerminal(Terminal, ILineTerminal, metaclass=ExtendedType, singleton=True): |
| 510 | + def __init__(self, verbose=False, debug=False, quiet=False, writeToStdOut=True): |
511 | 511 | """Initializer of a line based terminal interface.""" |
512 | 512 | Terminal.__init__(self) |
513 | 513 | ILineTerminal.__init__(self, self) |
|
0 commit comments