Skip to content

Commit

Permalink
test,refactor: misc fixes for linters
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Aug 9, 2024
1 parent 476185c commit 09c252f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ignore = [
"ANN201", # Missing return type annotation for public function
"ANN204", # Missing return type annotation for special method `__init__`
"C408", # Unnecessary `dict` call (rewrite as a literal)
"PLR0913", # Too many arguments in function definition (n > 5)
"S101", # Use of `assert` detected
]

Expand Down
8 changes: 5 additions & 3 deletions src/darker/tests/test_main_isort.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
pytestmark = pytest.mark.usefixtures("find_project_root_cache_clear")


def test_isort_option_without_isort(git_repo, caplog):
def test_isort_option_without_isort(git_repo): # noqa: ARG001

Check failure on line 18 in src/darker/tests/test_main_isort.py

View workflow job for this annotation

GitHub Actions / Pylint

src/darker/tests/test_main_isort.py#L18

Unused argument 'git_repo' (unused-argument, W0613)
"""Without isort, provide isort install instructions and error."""
with isort_present(False), patch.object(
# The `git_repo` fixture ensures test is not run in the Darker repository clone in
# CI builds. It helps avoid a NixOS test issue.
with isort_present(present=False), patch.object(
darker.__main__, "isort", None,
), pytest.raises(MissingPackageError) as exc_info:

Expand All @@ -29,7 +31,7 @@ def test_isort_option_without_isort(git_repo, caplog):
)


@pytest.fixture
@pytest.fixture()
def run_isort(git_repo, monkeypatch, caplog, request):
"""Fixture for running Darker with requested arguments and a patched `isort`.
Expand Down

0 comments on commit 09c252f

Please sign in to comment.