Skip to content

Commit 7388e9e

Browse files
committed
Fix Raises and update for pylint too-many-positional-arguments
This is in preview as ruff PLR0917, but we can't switch to that until it is released generally.
1 parent 270876a commit 7388e9e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/ansible_dev_environment/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def to_lines(
212212
class Output:
213213
"""Output functionality."""
214214

215-
def __init__(
215+
def __init__( # pylint: disable=too-many-positional-arguments
216216
self: Output,
217217
log_file: str,
218218
log_level: str,

src/ansible_dev_environment/subcommands/installer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def _install_galaxy_collections(
151151
collections: The collection objects.
152152
153153
Raises:
154-
SystemExit: If the collection installation fails.
154+
SystemError: If the collection installation fails.
155155
"""
156156
collections_str = " ".join(
157157
[f"'{collection.original}'" for collection in collections],
@@ -373,7 +373,7 @@ def _install_local_collection(
373373
374374
Raises:
375375
RuntimeError: If tarball is not found or if more than one tarball is found.
376-
SystemExit: If the collection installation fails.
376+
SystemError: If the collection installation fails.
377377
"""
378378
msg = f"Installing local collection from: {collection.build_dir}"
379379
self._output.info(msg)

src/ansible_dev_environment/tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def is_scalar(obj: JSONVal) -> bool:
107107
"""
108108
return isinstance(obj, str | int | float | bool) or obj is None
109109

110-
def _print_tree( # noqa: C901, PLR0912
110+
def _print_tree( # noqa: C901, PLR0912 # pylint: disable=too-many-positional-arguments
111111
self: Tree,
112112
obj: JSONVal,
113113
is_last: bool, # noqa: FBT001

src/ansible_dev_environment/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Ansi:
112112
GREY = "\x1b[90m"
113113

114114

115-
def subprocess_run( # noqa: PLR0913
115+
def subprocess_run( # noqa: PLR0913 # pylint: disable=too-many-positional-arguments
116116
command: str,
117117
verbose: int,
118118
msg: str,

tests/unit/test_installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ def test_collection_pre_install(
725725

726726
@pytest.mark.parametrize("first", (True, False), ids=["editable", "not_editable"])
727727
@pytest.mark.parametrize("second", (True, False), ids=["editable", "not_editable"])
728-
def test_reinstall_local_collection( # noqa: PLR0913
728+
def test_reinstall_local_collection( # noqa: PLR0913 # pylint: disable=too-many-positional-arguments
729729
first: bool, # noqa: FBT001
730730
second: bool, # noqa: FBT001
731731
tmp_path: Path,

0 commit comments

Comments
 (0)