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

chore: upgrade dependencies #517

Merged
merged 1 commit into from
Mar 29, 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
16 changes: 6 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: "3.12"
repos:
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.0.0
rev: v3.1.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
Expand All @@ -18,30 +18,26 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/pdm-project/pdm
rev: 2.11.1
rev: 2.13.1
hooks:
- id: pdm-lock-check
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.8"
rev: "v0.3.4"
hooks:
- id: ruff
args: ["--fix"]
- repo: https://github.com/psf/black
rev: 23.12.0
hooks:
- id: black
args: [--config=./pyproject.toml]
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
exclude: ".all-contributorsrc"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.7.1"
rev: "v1.9.0"
hooks:
- id: mypy
exclude: "test_decimal_constraints|examples/fields/test_example_2|examples/configuration|tools/"
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/configuration/test_example_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class PetFactory(DataclassFactory[Pet]):
name = Use(DataclassFactory.__random__.choice, ["Roxy", "Spammy", "Moshe"])


class PersonFactory(DataclassFactory[Person]):
...
class PersonFactory(DataclassFactory[Person]): ...


def test_default_pet_factory() -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/declaring_factories/test_example_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class Person(TypedDict):
weight: float


class PersonFactory(TypedDictFactory[Person]):
...
class PersonFactory(TypedDictFactory[Person]): ...


def test_is_person() -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/declaring_factories/test_example_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ class Person(BaseModel):
weight: float


class PersonFactory(ModelFactory[Person]):
...
class PersonFactory(ModelFactory[Person]): ...


def test_is_person() -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/declaring_factories/test_example_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class Person:
weight: float


class PersonFactory(DataclassFactory[Person]):
...
class PersonFactory(DataclassFactory[Person]): ...


def test_is_person() -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/declaring_factories/test_example_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class Person:
assets: List[Dict[str, Dict[str, Any]]]


class PersonFactory(DataclassFactory[Person]):
...
class PersonFactory(DataclassFactory[Person]): ...


def test_dynamic_factory_generation() -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/declaring_factories/test_example_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class Person:
_assets: List[Dict[str, Dict[str, Any]]]


class PersonFactory(AttrsFactory[Person]):
...
class PersonFactory(AttrsFactory[Person]): ...


def test_person_factory() -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/fixtures/test_example_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class Person:


@register_fixture
class PersonFactory(DataclassFactory[Person]):
...
class PersonFactory(DataclassFactory[Person]): ...


def test_person_factory(person_factory: PersonFactory) -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/fixtures/test_example_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class Person:
birthday: Union[datetime, date]


class PersonFactory(DataclassFactory[Person]):
...
class PersonFactory(DataclassFactory[Person]): ...


person_factory_fixture = register_fixture(PersonFactory)
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/fixtures/test_example_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class Person:
birthday: Union[datetime, date]


class PersonFactory(DataclassFactory[Person]):
...
class PersonFactory(DataclassFactory[Person]): ...


person_factory_fixture = register_fixture(PersonFactory, name="aliased_person_factory")
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/fixtures/test_example_4.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class ClassRoom:


@register_fixture
class PersonFactory(DataclassFactory[Person]):
...
class PersonFactory(DataclassFactory[Person]): ...


class ClassRoomFactory(DataclassFactory[ClassRoom]):
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/handling_custom_types/test_example_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class Person:


# we use our CustomDataclassFactory as a base for the PersonFactory
class PersonFactory(CustomDataclassFactory[Person]):
...
class PersonFactory(CustomDataclassFactory[Person]): ...


def test_custom_dataclass_base_factory() -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from polyfactory.factories.sqlalchemy_factory import SQLAlchemyFactory


class Base(DeclarativeBase):
...
class Base(DeclarativeBase): ...


class Author(Base):
Expand All @@ -14,8 +13,7 @@ class Author(Base):
name: Mapped[str]


class AuthorFactory(SQLAlchemyFactory[Author]):
...
class AuthorFactory(SQLAlchemyFactory[Author]): ...


def test_sqla_factory() -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from polyfactory.factories.sqlalchemy_factory import SQLAlchemyFactory


class Base(DeclarativeBase):
...
class Base(DeclarativeBase): ...


class Author(Base):
Expand All @@ -26,8 +25,7 @@ class Book(Base):
author_id: Mapped[int] = mapped_column(ForeignKey(Author.id))


class AuthorFactory(SQLAlchemyFactory[Author]):
...
class AuthorFactory(SQLAlchemyFactory[Author]): ...


class AuthorFactoryWithRelationship(SQLAlchemyFactory[Author]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from polyfactory.factories.sqlalchemy_factory import SQLAlchemyFactory


class Base(DeclarativeBase):
...
class Base(DeclarativeBase): ...


class Author(Base):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from polyfactory.factories.sqlalchemy_factory import SQLAlchemyFactory, T


class Base(DeclarativeBase):
...
class Base(DeclarativeBase): ...


class Author(Base):
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/model_coverage/test_example_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ class Profile:
vehicle: Car | Boat


class ProfileFactory(DataclassFactory[Profile]):
...
class ProfileFactory(DataclassFactory[Profile]): ...


def test_profile_coverage() -> None:
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/model_coverage/test_example_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class SocialGroup:
members: list[Profile]


class SocialGroupFactory(DataclassFactory[SocialGroup]):
...
class SocialGroupFactory(DataclassFactory[SocialGroup]): ...


def test_social_group_coverage() -> None:
Expand Down
Loading
Loading