diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py index b396e4621..ecf79c80a 100644 --- a/gitlab/v4/cli.py +++ b/gitlab/v4/cli.py @@ -394,7 +394,7 @@ def display(self, d: Union[str, Dict[str, Any]], **kwargs: Any) -> None: print(yaml.safe_dump(d, default_flow_style=False)) except ImportError: - exit( + sys.exit( "PyYaml is not installed.\n" "Install it with `pip install PyYaml` " "to use the yaml output feature" @@ -415,7 +415,7 @@ def display_list( ) ) except ImportError: - exit( + sys.exit( "PyYaml is not installed.\n" "Install it with `pip install PyYaml` " "to use the yaml output feature" diff --git a/pyproject.toml b/pyproject.toml index 0f16350dd..3399b57e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,6 @@ disable = [ "attribute-defined-outside-init", "broad-except", "consider-using-generator", - "consider-using-sys-exit", "cyclic-import", "duplicate-code", "fixme",