diff --git a/docs/conf.py b/docs/conf.py index 8499c14..a1c5366 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,4 +1,5 @@ """Sphinx config.""" + # # pytest-factoryboy documentation build configuration file, created by # sphinx-quickstart on Sun Apr 7 21:07:56 2013. diff --git a/pytest_factoryboy/__init__.py b/pytest_factoryboy/__init__.py index a86c372..c07d90b 100644 --- a/pytest_factoryboy/__init__.py +++ b/pytest_factoryboy/__init__.py @@ -1,4 +1,5 @@ """pytest-factoryboy public API.""" + from .fixture import LazyFixture, named_model, register __all__ = ("register", "named_model", "LazyFixture") diff --git a/pytest_factoryboy/fixture.py b/pytest_factoryboy/fixture.py index 782806e..97ccf07 100644 --- a/pytest_factoryboy/fixture.py +++ b/pytest_factoryboy/fixture.py @@ -1,4 +1,5 @@ """Factory boy fixture integration.""" + from __future__ import annotations import contextlib @@ -80,15 +81,13 @@ def named_model(model_cls: type[T], name: str) -> type[T]: # @register # class AuthorFactory(factory.Factory): ... @overload -def register(factory_class: F, _name: str | None = None, **kwargs: Any) -> F: - ... +def register(factory_class: F, _name: str | None = None, **kwargs: Any) -> F: ... # @register(...) # class AuthorFactory(factory.Factory): ... @overload -def register(*, _name: str | None = None, **kwargs: Any) -> Callable[[F], F]: - ... +def register(*, _name: str | None = None, **kwargs: Any) -> Callable[[F], F]: ... def register( diff --git a/pytest_factoryboy/hooks.py b/pytest_factoryboy/hooks.py index 1ef07ce..dec9f49 100644 --- a/pytest_factoryboy/hooks.py +++ b/pytest_factoryboy/hooks.py @@ -1,4 +1,5 @@ """pytest-factoryboy pytest hooks.""" + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/pytest_factoryboy/plugin.py b/pytest_factoryboy/plugin.py index 610bc29..ac2a7c6 100644 --- a/pytest_factoryboy/plugin.py +++ b/pytest_factoryboy/plugin.py @@ -1,4 +1,5 @@ """pytest-factoryboy plugin.""" + from __future__ import annotations from collections import defaultdict diff --git a/tests/test_circular.py b/tests/test_circular.py index 540278f..6ec6f6b 100644 --- a/tests/test_circular.py +++ b/tests/test_circular.py @@ -1,4 +1,5 @@ """Test circular definitions.""" + from __future__ import annotations from dataclasses import dataclass, field diff --git a/tests/test_factory_fixtures.py b/tests/test_factory_fixtures.py index 5cc3b8f..202973d 100644 --- a/tests/test_factory_fixtures.py +++ b/tests/test_factory_fixtures.py @@ -1,4 +1,5 @@ """Factory fixtures tests.""" + from __future__ import annotations from dataclasses import dataclass, field diff --git a/tests/test_lazy_fixture.py b/tests/test_lazy_fixture.py index e398352..c155b02 100644 --- a/tests/test_lazy_fixture.py +++ b/tests/test_lazy_fixture.py @@ -1,4 +1,5 @@ """Test LazyFixture related features.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/tests/test_postgen_dependencies.py b/tests/test_postgen_dependencies.py index 6bb0453..e9c9f7f 100644 --- a/tests/test_postgen_dependencies.py +++ b/tests/test_postgen_dependencies.py @@ -1,4 +1,5 @@ """Test post-generation dependencies.""" + from __future__ import annotations from dataclasses import dataclass, field