Add type hints to all test code (#1217)

* Add type hints to all test code

* Fixes

* Fix indentation

* Review fixes
This commit is contained in:
Marti Raudsepp
2022-10-31 11:20:10 +02:00
committed by GitHub
parent 9b4162beb1
commit e3c131bc61
16 changed files with 72 additions and 53 deletions

View File

@@ -543,7 +543,7 @@
from django.db import models
class User(models.Model):
pass
def get_user_model_name():
def get_user_model_name() -> str:
return 'myapp.User'
class Profile(models.Model):
user = models.ForeignKey(to=get_user_model_name(), on_delete=models.CASCADE)
@@ -703,7 +703,7 @@
def custom(self) -> None:
pass
def TransactionManager():
def TransactionManager() -> BaseManager:
return BaseManager.from_queryset(TransactionQuerySet)()
class Transaction(models.Model):