From e5a0bc3ecd4d9c46ead3b8217584eaa916a3afa4 Mon Sep 17 00:00:00 2001 From: Benjamin Klimczak Date: Thu, 24 Aug 2023 16:38:47 +0100 Subject: MLIA-961 Update tox dependencies - Update version dependencies in the tox.ini - Fix linter issues Change-Id: I04c3a841ee2646a865dab037701d66c28792f2a4 Signed-off-by: Benjamin Klimczak --- src/mlia/utils/console.py | 2 +- src/mlia/utils/logging.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mlia/utils') diff --git a/src/mlia/utils/console.py b/src/mlia/utils/console.py index 57e3ba2..1f432fb 100644 --- a/src/mlia/utils/console.py +++ b/src/mlia/utils/console.py @@ -77,7 +77,7 @@ def _get_table(table_style: str) -> Table: if table_style == "no_borders": return Table(show_header=False, box=None) - raise Exception(f"Unsupported table style {table_style}") + raise ValueError(f"Table style {table_style} is not supported.") def _convert_to_text(*renderables: RenderableType) -> str: diff --git a/src/mlia/utils/logging.py b/src/mlia/utils/logging.py index 17f6cae..07b16df 100644 --- a/src/mlia/utils/logging.py +++ b/src/mlia/utils/logging.py @@ -181,7 +181,7 @@ def create_log_handler( handler = logging.StreamHandler(stream) if handler is None: - raise Exception("Unable to create logging handler") + raise RuntimeError("Unable to create logging handler.") if log_level: handler.setLevel(log_level) -- cgit v1.2.1