Skip to content

Commit

Permalink
Add type hint for UserFactory (#5312)
Browse files Browse the repository at this point in the history
Since factory-boy 3.3.1, we can type annotate factories:

FactoryBoy/factory_boy#1059

Setting that up for the only factory of the project
  • Loading branch information
browniebroke authored Aug 21, 2024
1 parent f28b74f commit 6992738
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from {{ cookiecutter.project_slug }}.users.models import User


class UserFactory(DjangoModelFactory):
class UserFactory(DjangoModelFactory[User]):
{%- if cookiecutter.username_type == "username" %}
username = Faker("user_name")
{%- endif %}
Expand Down

0 comments on commit 6992738

Please sign in to comment.