Skip to content

Commit 9c60589

Browse files
authored
fix type for StepFunctionContext.converters
1 parent 4508b98 commit 9c60589

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/pytest_bdd/steps.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class StepFunctionContext:
6565
type: Literal["given", "when", "then"] | None
6666
step_func: Callable[..., Any]
6767
parser: StepParser
68-
converters: dict[str, Callable[..., Any]] = field(default_factory=dict)
68+
converters: dict[str, Callable[[str], Any]] = field(default_factory=dict)
6969
target_fixture: str | None = None
7070

7171

@@ -76,7 +76,7 @@ def get_step_fixture_name(step: Step) -> str:
7676

7777
def given(
7878
name: str | StepParser,
79-
converters: dict[str, Callable[[Any], Any]] | None = None,
79+
converters: dict[str, Callable[[str], Any]] | None = None,
8080
target_fixture: str | None = None,
8181
stacklevel: int = 1,
8282
) -> Callable[[Callable[P, T]], Callable[P, T]]:
@@ -95,7 +95,7 @@ def given(
9595

9696
def when(
9797
name: str | StepParser,
98-
converters: dict[str, Callable[[Any], Any]] | None = None,
98+
converters: dict[str, Callable[[str], Any]] | None = None,
9999
target_fixture: str | None = None,
100100
stacklevel: int = 1,
101101
) -> Callable[[Callable[P, T]], Callable[P, T]]:
@@ -114,7 +114,7 @@ def when(
114114

115115
def then(
116116
name: str | StepParser,
117-
converters: dict[str, Callable[[Any], Any]] | None = None,
117+
converters: dict[str, Callable[[str], Any]] | None = None,
118118
target_fixture: str | None = None,
119119
stacklevel: int = 1,
120120
) -> Callable[[Callable[P, T]], Callable[P, T]]:
@@ -134,7 +134,7 @@ def then(
134134
def step(
135135
name: str | StepParser,
136136
type_: Literal["given", "when", "then"] | None = None,
137-
converters: dict[str, Callable[[Any], Any]] | None = None,
137+
converters: dict[str, Callable[[str], Any]] | None = None,
138138
target_fixture: str | None = None,
139139
stacklevel: int = 1,
140140
) -> Callable[[Callable[P, T]], Callable[P, T]]:

0 commit comments

Comments
 (0)