Which one of these is the correct way to use type annotations for django models?
from typing import TypeVar, Generic
from app.models import User
_T = TypeVar("_T", bound=User)
def func(user: Generic[_T]):
user.name = 'John'
user.save()
Or
from typing import Type
from app.models import User
def func(user: Type(User)):
user.name = 'John'
user.save()
Or
from app.models import User
def func(user: User):
user.name = 'John'
user.save()