Skip to content

Commit

Permalink
refact: use colorama.just_fix_windows_console instead of colorama.init
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Dec 28, 2024
1 parent 679d085 commit 2705dc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/kleinanzeigen_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
LOG:Final[logging.Logger] = get_translating_logger(__name__)
LOG.setLevel(logging.INFO)

colorama.init()
colorama.just_fix_windows_console()


class KleinanzeigenBot(WebScrapingMixin):
Expand Down Expand Up @@ -163,7 +163,7 @@ def show_help(self) -> None:
--logfile=<PATH> - Pfad zur Protokolldatei (STANDARD: ./kleinanzeigen-bot.log)
--lang=en|de - Anzeigesprache (STANDARD: Systemsprache, wenn unterstützt, sonst Englisch)
-v, --verbose - Aktiviert detaillierte Ausgabe – nur nützlich zur Fehlerbehebung
"""))
""".rstrip()))
else:
print(textwrap.dedent(f"""\
Usage: {colorama.Fore.LIGHTMAGENTA_EX}{exe} COMMAND [OPTIONS]{colorama.Style.RESET_ALL}
Expand Down Expand Up @@ -195,7 +195,7 @@ def show_help(self) -> None:
--logfile=<PATH> - path to the logfile (DEFAULT: ./kleinanzeigen-bot.log)
--lang=en|de - display language (STANDARD: system language if supported, otherwise English)
-v, --verbose - enables verbose output - only useful when troubleshooting issues
"""))
""".rstrip()))

def parse_args(self, args:list[str]) -> None:
try:
Expand Down

0 comments on commit 2705dc7

Please sign in to comment.