Skip to content

Commit 00915ba

Browse files
committed
Fix types
1 parent 15cd119 commit 00915ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pytest_factoryboy/fixture.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import inflection
2020
from typing_extensions import ParamSpec, TypeAlias
2121

22-
from .compat import PostGenerationContext
22+
from .compat import PostGenerationContext, PytestFixtureT
2323
from .fixturegen import create_fixture
2424

2525
if TYPE_CHECKING:
@@ -136,7 +136,7 @@ def generate_fixtures(
136136
factory_name: str,
137137
overrides: Mapping[str, Any],
138138
caller_locals: Box[Mapping[str, Any]],
139-
) -> Iterable[tuple[str, Callable[..., Any]]]:
139+
) -> Iterable[tuple[str, Callable[..., object]]]:
140140
"""Generate all the FixtureDefs for the given factory class."""
141141

142142
related: list[str] = []
@@ -176,10 +176,10 @@ def generate_fixtures(
176176

177177
def create_fixture_with_related(
178178
name: str,
179-
function: Callable[P, T],
179+
function: Callable[..., object],
180180
fixtures: Collection[str] | None = None,
181181
related: Collection[str] | None = None,
182-
) -> Callable[P, T]:
182+
) -> PytestFixtureT:
183183
if related is None:
184184
related = []
185185
fixture, fn = create_fixture(name=name, function=function, fixtures=fixtures)
@@ -195,7 +195,7 @@ def make_declaration_fixturedef(
195195
value: Any,
196196
factory_class: FactoryType,
197197
related: list[str],
198-
) -> Callable[..., Any]:
198+
) -> Callable[..., object]:
199199
"""Create the FixtureDef for a factory declaration."""
200200
if isinstance(value, (factory.SubFactory, factory.RelatedFactory)):
201201
subfactory_class = value.get_factory()

0 commit comments

Comments
 (0)