diff --git a/infrahub_sdk/ctl/cli_commands.py b/infrahub_sdk/ctl/cli_commands.py index accebe4b..2b571723 100644 --- a/infrahub_sdk/ctl/cli_commands.py +++ b/infrahub_sdk/ctl/cli_commands.py @@ -239,7 +239,7 @@ async def _run_transform( elif isinstance(error, str) and "Branch:" in error: console.print(f"[yellow] - {error}") console.print("[yellow] you can specify a different branch with --branch") - raise typer.Abort() + raise typer.Abort if inspect.iscoroutinefunction(transform_func): output = await transform_func(response) diff --git a/infrahub_sdk/ctl/config.py b/infrahub_sdk/ctl/config.py index 38b527d1..b3d2a404 100644 --- a/infrahub_sdk/ctl/config.py +++ b/infrahub_sdk/ctl/config.py @@ -44,7 +44,7 @@ def active(self) -> Settings: return self._settings print("Configuration not properly loaded") - raise typer.Abort() + raise typer.Abort def load(self, config_file: str | Path = "infrahubctl.toml", config_data: dict | None = None) -> None: """Load configuration. @@ -90,7 +90,7 @@ def load_and_exit(self, config_file: str | Path = "infrahubctl.toml", config_dat for error in exc.errors(): loc_str = [str(item) for item in error["loc"]] print(f" {'/'.join(loc_str)} | {error['msg']} ({error['type']})") - raise typer.Abort() + raise typer.Abort SETTINGS = ConfiguredSettings() diff --git a/pyproject.toml b/pyproject.toml index 2ade0bc8..fbd19a54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -229,7 +229,6 @@ ignore = [ "TID", # flake8-tidy-imports "FBT", # flake8-boolean-trap "G", # flake8-logging-format - "RSE", # flake8-raise "BLE", # flake8-blind-except (BLE) ##################################################################################################