Skip to content

Commit

Permalink
Fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
realshouzy committed Jul 13, 2024
1 parent 2d07e5a commit 8b5e95d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions pip_manage/_pip_interface.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
from __future__ import annotations

__all__: list[str] = [
"update_packages",
"get_outdated_packages",
"uninstall_packages",
"PIP_CMD",
"LIST_ONLY",
"COMMON_PARAMETERS",
"INSTALL_ONLY",
"LIST_ONLY",
"PIP_CMD",
"UNINSTALL_ONLY",
"COMMON_PARAMETERS",
"get_outdated_packages",
"uninstall_packages",
"update_packages",
]

import dataclasses
import json
import subprocess # nosec
import subprocess # nosec # noqa: S404
import sys
from typing import TYPE_CHECKING, Final

Expand Down
2 changes: 1 addition & 1 deletion pip_manage/pip_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def ask(self) -> str:
.strip()
.casefold()
)
answer = self.last_answer if answer == "" else answer
answer = answer if answer else self.last_answer

if answer in {"q", "a"}:
self.cached_answer = answer
Expand Down
6 changes: 3 additions & 3 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ def _keep_pytest_handlers_during_dict_config(monkeypatch: pytest.MonkeyPatch) ->
)


@pytest.fixture()
@pytest.fixture
def sample_packages() -> list[_OutdatedPackage]:
return [
_OutdatedPackage("test1", "1.0.0", "1.1.0", "wheel"),
_OutdatedPackage("test2", "1.9.9", "2.0.0", "wheel"),
]


@pytest.fixture()
@pytest.fixture
def sample_subprocess_output() -> bytes:
# pylint: disable=C0301
return (
Expand All @@ -64,7 +64,7 @@ def sample_subprocess_output() -> bytes:
)


@pytest.fixture()
@pytest.fixture
def dummy_dependencies() -> list[SimpleNamespace]:
package_a: SimpleNamespace = SimpleNamespace(
name="package_a",
Expand Down

0 comments on commit 8b5e95d

Please sign in to comment.