Skip to content

Commit

Permalink
Merge pull request #212 from pytest-dev/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
youtux authored Sep 30, 2024
2 parents f3c9de1 + c3c7c8e commit 2bd2028
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 8 deletions.
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

0 comments on commit 2bd2028

Please sign in to comment.