Skip to content

Commit

Permalink
Use SaveHooks as explicit generic type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Jun 18, 2024
1 parent f7414aa commit d51b94b
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions django_fakery/faker_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def build_one(
self,
model: T,
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
make_fks: bool,
iteration: Opt[int],
Expand Down Expand Up @@ -234,8 +234,8 @@ def build(
self,
model: T,
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
seed: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
seed: Opt[SaveHooks[T]],
quantity: None,
make_fks: bool,
) -> Built: # pragma: no cover
Expand All @@ -258,7 +258,7 @@ def build(
self,
model: T,
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
quantity: Opt[int],
make_fks: bool,
Expand Down Expand Up @@ -302,8 +302,8 @@ def make_one(
self,
model: T,
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
iteration: Opt[int],
) -> T: # pragma: no cover
Expand Down Expand Up @@ -358,8 +358,8 @@ def get_or_make(
model: T,
lookup: Opt[Lookup],
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
) -> Tuple[T, bool]: # pragma: no cover
pass
Expand Down Expand Up @@ -406,8 +406,8 @@ def g_m(
self,
model: T,
lookup: Opt[Lookup],
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
) -> Callable[..., T]: # pragma: no cover
pass
Expand Down Expand Up @@ -445,8 +445,8 @@ def update_or_make(
model: T,
lookup: Opt[Lookup],
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
) -> Tuple[T, bool]: # pragma: no cover
pass
Expand Down Expand Up @@ -501,8 +501,8 @@ def u_m(
self,
model: T,
lookup: Opt[Lookup],
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
) -> Callable[..., T]: # pragma: no cover
pass
Expand Down Expand Up @@ -539,8 +539,8 @@ def make(
self,
model: T,
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
quantity: None,
) -> T: # pragma: no cover
Expand All @@ -563,8 +563,8 @@ def make(
self,
model: T,
fields: Opt[FieldMap],
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
quantity: Opt[int],
) -> List[T]: # pragma: no cover
Expand Down Expand Up @@ -604,8 +604,8 @@ def m(
def m(
self,
model: T,
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
quantity: None,
) -> Callable[..., T]: # pragma: no cover
Expand All @@ -626,8 +626,8 @@ def m(
def m(
self,
model: T,
pre_save: Opt[SaveHooks],
post_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
post_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
quantity: Opt[int],
) -> Callable[..., List[T]]: # pragma: no cover
Expand Down Expand Up @@ -663,7 +663,7 @@ def b(
def b(
self,
model: T,
pre_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
quantity: None,
make_fks: bool,
Expand All @@ -685,7 +685,7 @@ def b(
def b(
self,
model: T,
pre_save: Opt[SaveHooks],
pre_save: Opt[SaveHooks[T]],
seed: Opt[Seed],
quantity: Opt[int],
make_fks: bool,
Expand Down

0 comments on commit d51b94b

Please sign in to comment.