fix: use get_user_model() for E5102 imported-auth-user

Don't import django.contrib.auth.models.User model. Use
django.contrib.auth.get_user_model() instead.

36ea72b37c/pylint_django/checkers/auth_user.py (L18-L22)
This commit is contained in:
Phillip Shiu
2023-06-22 18:46:22 -04:00
parent 43ea99e3a6
commit 0ca47c7119

View File

@@ -9,12 +9,14 @@ from math import ceil
from textwrap import dedent
from django.core.management import BaseCommand
from django.contrib.auth.models import User
from django.contrib.auth import get_user_model
from common.djangoapps.entitlements.tasks import expire_and_create_entitlements
from common.djangoapps.entitlements.models import CourseEntitlement
logger = logging.getLogger(__name__) # pylint: disable=invalid-name
User = get_user_model()
#course uuids for which entitlements should be expired after 18 months.
MIT_SUPPLY_CHAIN_COURSES = [
'0d9b47982e3d486aa3189a7035bbda77',