Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 5, 2024
1 parent 853ea48 commit 8370a2c
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx config."""

#
# pytest-factoryboy documentation build configuration file, created by
# sphinx-quickstart on Sun Apr 7 21:07:56 2013.
Expand Down
1 change: 1 addition & 0 deletions pytest_factoryboy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest-factoryboy public API."""

from .fixture import LazyFixture, named_model, register

__all__ = ("register", "named_model", "LazyFixture")
7 changes: 3 additions & 4 deletions pytest_factoryboy/fixture.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Factory boy fixture integration."""

from __future__ import annotations

import contextlib
Expand Down Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions pytest_factoryboy/hooks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest-factoryboy pytest hooks."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions pytest_factoryboy/plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""pytest-factoryboy plugin."""

from __future__ import annotations

from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions tests/test_circular.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test circular definitions."""

from __future__ import annotations

from dataclasses import dataclass, field
Expand Down
1 change: 1 addition & 0 deletions tests/test_factory_fixtures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Factory fixtures tests."""

from __future__ import annotations

from dataclasses import dataclass, field
Expand Down
1 change: 1 addition & 0 deletions tests/test_lazy_fixture.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test LazyFixture related features."""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions tests/test_postgen_dependencies.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test post-generation dependencies."""

from __future__ import annotations

from dataclasses import dataclass, field
Expand Down

0 comments on commit 8370a2c

Please sign in to comment.