From 853ea48f126fc416aa0477c2ca6c3c3aa68b2681 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:10:34 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.11.0 → 24.8.0](https://github.com/psf/black/compare/23.11.0...24.8.0) - [github.com/pycqa/isort: 5.12.0 → 5.13.2](https://github.com/pycqa/isort/compare/5.12.0...5.13.2) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/asottile/pyupgrade: v3.15.0 → v3.17.0](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.17.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0461e57..ddaffe4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] From 8370a2c3f170813d572549a726f6635cfc0b9bcc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:12:25 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 1 + pytest_factoryboy/__init__.py | 1 + pytest_factoryboy/fixture.py | 7 +++---- pytest_factoryboy/hooks.py | 1 + pytest_factoryboy/plugin.py | 1 + tests/test_circular.py | 1 + tests/test_factory_fixtures.py | 1 + tests/test_lazy_fixture.py | 1 + tests/test_postgen_dependencies.py | 1 + 9 files changed, 11 insertions(+), 4 deletions(-) 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