mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
This commit is contained in:
@@ -3,7 +3,6 @@ import warnings
|
||||
|
||||
from django.forms.utils import flatatt, pretty_name
|
||||
from django.forms.widgets import Textarea, TextInput
|
||||
from django.utils import six
|
||||
from django.utils.deprecation import RemovedInDjango21Warning
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.functional import cached_property
|
||||
@@ -63,7 +62,7 @@ class BoundField(object):
|
||||
def __getitem__(self, idx):
|
||||
# Prevent unnecessary reevaluation when accessing BoundField's attrs
|
||||
# from templates.
|
||||
if not isinstance(idx, six.integer_types + (slice,)):
|
||||
if not isinstance(idx, (int, slice)):
|
||||
raise TypeError
|
||||
return self.subwidgets[idx]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user