Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #212

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
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
Loading