From d00ca78fb70c0aa09f33d75d8b4bf88621b747be Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:28:45 +0000 Subject: [PATCH] chore(deps): update ruff to v0.5.0 Signed-off-by: JP-Ellis --- .pre-commit-config.yaml | 2 +- docs/scripts/markdown.py | 4 ++-- docs/scripts/python.py | 4 ++-- pyproject.toml | 2 +- tests/v3/compatibility_suite/util/consumer.py | 4 ++-- tests/v3/compatibility_suite/util/provider.py | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 102362799..38ad04aee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,7 +42,7 @@ repos: stages: [pre-push] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.10 + rev: v0.5.0 hooks: - id: ruff # Exclude python files in pact/** and tests/**, except for the diff --git a/docs/scripts/markdown.py b/docs/scripts/markdown.py index 5f81ab8ca..c27b8b73b 100644 --- a/docs/scripts/markdown.py +++ b/docs/scripts/markdown.py @@ -75,8 +75,8 @@ def process_markdown( ] files = sorted( Path(p) - for p in subprocess.check_output( - ["git", "ls-files", src], # noqa: S603, S607 + for p in subprocess.check_output( # noqa: S603 + ["git", "ls-files", src], # noqa: S607 ) .decode("utf-8") .splitlines() diff --git a/docs/scripts/python.py b/docs/scripts/python.py index 14ee78f33..21e024fee 100644 --- a/docs/scripts/python.py +++ b/docs/scripts/python.py @@ -165,8 +165,8 @@ def process_python( ignore_spec = PathSpec.from_lines("gitwildmatch", ignore or []) files = sorted( Path(p) - for p in subprocess.check_output( - ["git", "ls-files", src], # noqa: S603, S607 + for p in subprocess.check_output( # noqa: S603 + ["git", "ls-files", src], # noqa: S607 ) .decode("utf-8") .splitlines() diff --git a/pyproject.toml b/pyproject.toml index 7a1a94bfd..1780f266a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,7 +89,7 @@ devel-test = [ "pytest-cov ~=5.0", "testcontainers ~=3.0", ] -devel = ["pact-python[devel-types,devel-docs,devel-test]", "ruff==0.4.10"] +devel = ["pact-python[devel-types,devel-docs,devel-test]", "ruff==0.5.0"] ################################################################################ ## Hatch Build Configuration diff --git a/tests/v3/compatibility_suite/util/consumer.py b/tests/v3/compatibility_suite/util/consumer.py index d58f5fe24..66033cd50 100644 --- a/tests/v3/compatibility_suite/util/consumer.py +++ b/tests/v3/compatibility_suite/util/consumer.py @@ -647,8 +647,8 @@ def _( expected = {key: value} actual = pact_file["interactions"][n - 1]["request"]["headers"] assert expected.keys() == actual.keys() - for key in expected: - assert expected[key] == actual[key] or [expected[key]] == actual[key] + for k in expected: + assert expected[k] == actual[k] or [expected[k]] == actual[k] def the_nth_interaction_request_content_type_will_be(stacklevel: int = 1) -> None: diff --git a/tests/v3/compatibility_suite/util/provider.py b/tests/v3/compatibility_suite/util/provider.py index 616b11dc4..f9ab72b90 100644 --- a/tests/v3/compatibility_suite/util/provider.py +++ b/tests/v3/compatibility_suite/util/provider.py @@ -393,8 +393,8 @@ def publish(self, directory: Path | str, version: str | None = None) -> None: cmd.extend(["--consumer-app-version", version or next_version()]) - subprocess.run( - cmd, # noqa: S603 + subprocess.run( # noqa: S603 + cmd, encoding="utf-8", check=True, ) @@ -580,8 +580,8 @@ def _( def start_provider(provider_dir: str | Path) -> Generator[URL, None, None]: # noqa: C901 """Start the provider app with the given interactions.""" - process = subprocess.Popen( - [ # noqa: S603 + process = subprocess.Popen( # noqa: S603 + [ sys.executable, Path(__file__), str(provider_dir),