Skip to content

Commit ccd1d28

Browse files
fix(deps): update ruff to v0.10.0 (#1024)
Signed-off-by: JP-Ellis <josh@jpellis.me> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: JP-Ellis <josh@jpellis.me>
1 parent 8d19bea commit ccd1d28

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ repos:
4848
- id: taplo-lint
4949

5050
- repo: https://github.com/astral-sh/ruff-pre-commit
51-
rev: v0.9.10
51+
rev: v0.10.0
5252
hooks:
5353
- id: ruff
5454
# Exclude python files in pact/** and tests/**, except for the

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ dependencies = [
6464
[project.optional-dependencies]
6565
# Linting and formatting tools use a more narrow specification to ensure
6666
# developper consistency. All other dependencies are as above.
67-
devel = ["pact-python[devel-types,devel-docs,devel-test]", "ruff==0.9.10"]
67+
devel = ["pact-python[devel-types,devel-docs,devel-test]", "ruff==0.10.0"]
6868
devel-docs = [
6969
"mkdocs-literate-nav~=0.6",
7070
"mkdocs-material[imaging]~=9.4",

src/pact/v3/ffi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ def __init__(self, cdata: cffi.FFI.CData) -> None:
17551755
if ffi.typeof(cdata).cname != "struct StringResult":
17561756
msg = f"cdata must be a struct StringResult, got {ffi.typeof(cdata).cname}"
17571757
raise TypeError(msg)
1758-
self._cdata = typing.cast(StringResult._StringResultCData, cdata)
1758+
self._cdata = typing.cast("StringResult._StringResultCData", cdata)
17591759

17601760
def __str__(self) -> str:
17611761
"""

src/pact/v3/types.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# noqa: A005
21
"""
32
Typing definitions for the matchers.
43

src/pact/v3/verifier.py

+15-14
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,21 @@
8787

8888
import pact.v3.ffi
8989
from pact.v3._server import MessageProducer, StateCallback
90-
from pact.v3.types import (
91-
Message,
92-
MessageProducerFull,
93-
MessageProducerNoName,
94-
StateHandlerFull,
95-
StateHandlerNoAction,
96-
StateHandlerNoActionNoState,
97-
StateHandlerNoState,
98-
StateHandlerUrl,
99-
)
10090

10191
if TYPE_CHECKING:
10292
from collections.abc import Iterable
10393

94+
from pact.v3.types import (
95+
Message,
96+
MessageProducerFull,
97+
MessageProducerNoName,
98+
StateHandlerFull,
99+
StateHandlerNoAction,
100+
StateHandlerNoActionNoState,
101+
StateHandlerNoState,
102+
StateHandlerUrl,
103+
)
104+
104105
logger = logging.getLogger(__name__)
105106

106107

@@ -692,7 +693,7 @@ def _state_handler_dict(
692693
msg = "All functions must take two arguments: action and parameters"
693694
raise TypeError(msg)
694695

695-
handler_map = typing.cast(dict[str, StateHandlerNoState], handler)
696+
handler_map = typing.cast("dict[str, StateHandlerNoState]", handler)
696697

697698
def _handler(
698699
state: str,
@@ -707,7 +708,7 @@ def _handler(
707708
raise TypeError(msg)
708709

709710
handler_map_no_action = typing.cast(
710-
dict[str, StateHandlerNoActionNoState],
711+
"dict[str, StateHandlerNoActionNoState]",
711712
handler,
712713
)
713714

@@ -771,7 +772,7 @@ def _set_function_state_handler(
771772
)
772773
raise TypeError(msg)
773774

774-
handler_fn_full = typing.cast(StateHandlerFull, handler)
775+
handler_fn_full = typing.cast("StateHandlerFull", handler)
775776

776777
def _handler(
777778
state: str,
@@ -785,7 +786,7 @@ def _handler(
785786
msg = "The function must take two arguments: state and parameters"
786787
raise TypeError(msg)
787788

788-
handler_fn_no_action = typing.cast(StateHandlerNoAction, handler)
789+
handler_fn_no_action = typing.cast("StateHandlerNoAction", handler)
789790

790791
def _handler(
791792
state: str,

tests/v3/compatibility_suite/util/interaction_definition.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def parse_fixture(self, fixture: Path) -> None:
111111
if content_type is None:
112112
msg = "Invalid XML fixture document: no contentType"
113113
raise ValueError(msg)
114-
self.string = typing.cast(str, contents.text)
114+
self.string = typing.cast("str", contents.text)
115115

116116
if eol := contents.attrib.get("eol", None):
117117
if eol == "CRLF":

0 commit comments

Comments
 (0)