Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
- id: biome-check

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.14
rev: v0.15.1
hooks:
- id: ruff-check
exclude: |
Expand Down
2 changes: 1 addition & 1 deletion docs/scripts/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def is_binary(buffer: bytes) -> bool:
for source_path in ALL_FILES:
if not source_path.is_file():
continue
if source_path.parts[0] in ["docs"]:
if source_path.parts[0] == "docs":
continue

dest_path = Path(DOCS_DEST, source_path)
Expand Down
2 changes: 1 addition & 1 deletion pact-python-cli/hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def _download(self, url: str) -> Path:
Returns:
The path to the downloaded artefact.
"""
filename = url.split("/")[-1]
filename = url.rsplit("/", maxsplit=1)[-1]
artefact = PKG_DIR / "data" / filename
artefact.parent.mkdir(parents=True, exist_ok=True)

Expand Down
2 changes: 1 addition & 1 deletion pact-python-cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ requires-python = ">=3.10"
[dependency-groups]
# Linting and formatting tools use a more narrow specification to ensure
# developper consistency. All other dependencies are as above.
dev = ["ruff==0.14.14", { include-group = "test" }, { include-group = "types" }]
dev = ["ruff==0.15.1", { include-group = "test" }, { include-group = "types" }]
test = ["pytest-cov~=7.0", "pytest~=9.0"]
types = ["mypy==1.19.1"]

Expand Down
2 changes: 1 addition & 1 deletion pact-python-ffi/hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def _download(self, url: str) -> Path:
Returns:
The path to the downloaded artefact.
"""
filename = url.split("/")[-1]
filename = url.rsplit("/", maxsplit=1)[-1]
artefact = PKG_DIR / "data" / filename
artefact.parent.mkdir(parents=True, exist_ok=True)

Expand Down
2 changes: 1 addition & 1 deletion pact-python-ffi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies = ["cffi~=2.0"]
"Repository" = "https://github.com/pact-foundation/pact-python"

[dependency-groups]
dev = ["ruff==0.14.14", { include-group = "test" }, { include-group = "types" }]
dev = ["ruff==0.15.1", { include-group = "test" }, { include-group = "types" }]
test = ["pytest-cov~=7.0", "pytest~=9.0"]
types = ["mypy==1.19.1", "typing-extensions~=4.0"]

Expand Down
4 changes: 2 additions & 2 deletions pact-python-ffi/src/pact_ffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6452,7 +6452,7 @@ def with_binary_body(
interaction._ref,
part.value,
content_type.encode("utf-8") if content_type else ffi.NULL,
body if body else ffi.NULL,
body or ffi.NULL,
len(body) if body else 0,
)
if not success:
Expand Down Expand Up @@ -6511,7 +6511,7 @@ def with_binary_file(
interaction._ref,
part.value,
content_type.encode("utf-8") if content_type else ffi.NULL,
body if body else ffi.NULL,
body or ffi.NULL,
len(body) if body else 0,
)
if not success:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ dependencies = [
# Linting and formatting tools use a more narrow specification to ensure
# developper consistency. All other dependencies are as above.
dev = [
"ruff==0.14.14",
"ruff==0.15.1",
{ include-group = "docs" },
{ include-group = "example" },
{ include-group = "test" },
Expand Down
2 changes: 1 addition & 1 deletion src/pact/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def format_code_to_java_format(code: str) -> str:
raise ValueError(msg)

# The following codes simply do not have a direct equivalent in Java.
if code in ["w"]:
if code == "w":
msg = f"Python format code `%{code}` is not supported in Java"
raise ValueError(msg)

Expand Down
4 changes: 2 additions & 2 deletions tests/compatibility_suite/util/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _(
if definition.query
else None
),
headers=definition.headers if definition.headers else None, # type: ignore[arg-type]
headers=definition.headers or None, # type: ignore[arg-type]
data=definition.body.bytes if definition.body else None,
timeout=5,
)
Expand Down Expand Up @@ -293,7 +293,7 @@ def _(
if definition.query
else None
),
headers=definition.headers if definition.headers else None, # type: ignore[arg-type]
headers=definition.headers or None, # type: ignore[arg-type]
data=definition.body.bytes if definition.body else None,
timeout=5,
)
Expand Down
Loading