Skip to content

Commit

Permalink
Merge pull request #164 from sasacocic/update_G_type
Browse files Browse the repository at this point in the history
Update `G` functions return type to include lists if `n` argument is used
  • Loading branch information
paulocheque authored Jul 30, 2024
2 parents 50d6f0e + 867c002 commit 8ca60cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_dynamic_fixture/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _teach(model, ddf_lesson=None, **kwargs):
def new(model: typing.Type[INSTANCE_TYPE], n: int = 1, ddf_lesson = None, persist_dependencies: bool = True, **kwargs) -> INSTANCE_TYPE:
return _new(model, n=n, ddf_lesson=ddf_lesson, persist_dependencies=persist_dependencies, **kwargs)

def get(model: typing.Type[INSTANCE_TYPE], n: int=1, ddf_lesson=None, **kwargs) -> INSTANCE_TYPE:
def get(model: typing.Type[INSTANCE_TYPE], n: int=1, ddf_lesson=None, **kwargs) -> INSTANCE_TYPE | typing.List[INSTANCE_TYPE]:
return _get(model, n=n, ddf_lesson=ddf_lesson, **kwargs)

def teach(model: typing.Type[INSTANCE_TYPE], ddf_lesson=None, **kwargs):
Expand Down

0 comments on commit 8ca60cf

Please sign in to comment.