mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-11-05 20:03:00 +08:00
fix mypy errors
This commit is contained in:
1 parent
6466c57c69
commit
4c21855641
12 files changed
+168
-118
No files matched your search
@@ -9,7 +9,7 @@ from mypy_django_plugin.lib import helpers
|
||||
def set_auth_user_model_as_type_for_request_user(ctx: AttributeContext, django_context: DjangoContext) -> MypyType:
|
||||
auth_user_model = django_context.settings.AUTH_USER_MODEL
|
||||
model_cls = django_context.apps_registry.get_model(auth_user_model)
|
||||
model_info = helpers.lookup_class_typeinfo(ctx.api, model_cls)
|
||||
model_info = helpers.lookup_class_typeinfo(helpers.get_typechecker_api(ctx), model_cls)
|
||||
if model_info is None:
|
||||
return ctx.default_attr_type
|
||||
|
||||
|
||||
Reference in new issue
Block a user