From 0afcc3eca4798801ff3635b05b871e025078ef31 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 3 Jun 2022 09:03:22 -0700 Subject: [PATCH] chore: enable 'consider-using-sys-exit' pylint check Enable the 'consider-using-sys-exit' pylint check and fix errors raised. --- gitlab/v4/cli.py | 4 ++-- pyproject.toml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) 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",