浏览代码

Removed transitive import of types.MethodType from six.

Curtis Maloney 8 年之前
父节点
当前提交
4c94336510
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      django/contrib/auth/checks.py

+ 3 - 3
django/contrib/auth/checks.py

@@ -2,11 +2,11 @@
 from __future__ import unicode_literals
 
 from itertools import chain
+from types import MethodType
 
 from django.apps import apps
 from django.conf import settings
 from django.core import checks
-from django.utils import six
 
 from .management import _get_builtin_permissions
 
@@ -74,7 +74,7 @@ def check_user_model(app_configs=None, **kwargs):
                 )
             )
 
-    if isinstance(cls().is_anonymous, six.types.MethodType):
+    if isinstance(cls().is_anonymous, MethodType):
         errors.append(
             checks.Critical(
                 '%s.is_anonymous must be an attribute or property rather than '
@@ -84,7 +84,7 @@ def check_user_model(app_configs=None, **kwargs):
                 id='auth.C009',
             )
         )
-    if isinstance(cls().is_authenticated, six.types.MethodType):
+    if isinstance(cls().is_authenticated, MethodType):
         errors.append(
             checks.Critical(
                 '%s.is_authenticated must be an attribute or property rather '