Skip to content

Commit 0afcc3e

Browse files
chore: enable 'consider-using-sys-exit' pylint check
Enable the 'consider-using-sys-exit' pylint check and fix errors raised.
1 parent 00aec96 commit 0afcc3e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

gitlab/v4/cli.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def display(self, d: Union[str, Dict[str, Any]], **kwargs: Any) -> None:
394394

395395
print(yaml.safe_dump(d, default_flow_style=False))
396396
except ImportError:
397-
exit(
397+
sys.exit(
398398
"PyYaml is not installed.\n"
399399
"Install it with `pip install PyYaml` "
400400
"to use the yaml output feature"
@@ -415,7 +415,7 @@ def display_list(
415415
)
416416
)
417417
except ImportError:
418-
exit(
418+
sys.exit(
419419
"PyYaml is not installed.\n"
420420
"Install it with `pip install PyYaml` "
421421
"to use the yaml output feature"

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ disable = [
5252
"attribute-defined-outside-init",
5353
"broad-except",
5454
"consider-using-generator",
55-
"consider-using-sys-exit",
5655
"cyclic-import",
5756
"duplicate-code",
5857
"fixme",

0 commit comments

Comments
 (0)