Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed import * in tests.

Thanks to flake8 path/to/file.py | awk -F ' ' '{ print $5 }' | sort | uniq
  • Loading branch information...
commit 8e2029f8ddd744acb97e236cb0703d94b12d5ff8 1 parent 2110b31
@timgraham timgraham authored
View
2  django/contrib/admin/util.py
@@ -4,4 +4,4 @@
"The django.contrib.admin.util module has been renamed. "
"Use django.contrib.admin.utils instead.", PendingDeprecationWarning)
-from django.contrib.admin.utils import *
+from django.contrib.admin.utils import * # NOQA
View
4 django/contrib/formtools/tests/tests.py
@@ -12,7 +12,9 @@
from django.test.utils import override_settings
from django.utils._os import upath
-from django.contrib.formtools.tests.forms import *
+from django.contrib.formtools.tests.forms import (
+ HashTestBlankForm, HashTestForm, TestForm,
+)
success_string = "Done was called!"
success_string_encoded = success_string.encode()
View
2  django/contrib/gis/db/backends/util.py
@@ -4,4 +4,4 @@
"The django.contrib.gis.db.backends.util module has been renamed. "
"Use django.contrib.gis.db.backends.utils instead.", PendingDeprecationWarning)
-from django.contrib.gis.db.backends.utils import *
+from django.contrib.gis.db.backends.utils import * # NOQA
View
2  django/contrib/gis/geos/tests/test_geos_mutation.py
@@ -8,7 +8,7 @@
from .. import HAS_GEOS
if HAS_GEOS:
- from .. import *
+ from .. import fromstr, LinearRing, LineString, MultiPoint, Point, Polygon
from ..error import GEOSIndexError
View
2  django/contrib/webdesign/tests.py
@@ -3,7 +3,7 @@
import unittest
-from django.contrib.webdesign.lorem_ipsum import *
+from django.contrib.webdesign.lorem_ipsum import paragraphs, words
from django.template import loader, Context
View
2  django/db/backends/util.py
@@ -4,4 +4,4 @@
"The django.db.backends.util module has been renamed. "
"Use django.db.backends.utils instead.", PendingDeprecationWarning)
-from django.db.backends.utils import *
+from django.db.backends.utils import * # NOQA
View
2  django/forms/util.py
@@ -4,4 +4,4 @@
"The django.forms.util module has been renamed. "
"Use django.forms.utils instead.", PendingDeprecationWarning)
-from django.forms.utils import *
+from django.forms.utils import * # NOQA
View
10 tests/admin_inlines/admin.py
@@ -1,7 +1,15 @@
from django.contrib import admin
from django import forms
-from .models import *
+from .models import (
+ Author, BinaryTree, CapoFamiglia, Chapter, ChildModel1, ChildModel2,
+ Consigliere, EditablePKBook, ExtraTerrestrial, Fashionista, Holder,
+ Holder2, Holder3, Holder4, Inner, Inner2, Inner3, Inner4Stacked,
+ Inner4Tabular, NonAutoPKBook, Novel, ParentModelWithCustomPk, Poll,
+ Profile, ProfileCollection, Question, ReadOnlyInline, ShoppingWeakness,
+ Sighting, SomeChildModel, SomeParentModel, SottoCapo, Title,
+ TitleCollection,
+)
site = admin.AdminSite(name="admin")
View
12 tests/defaultfilters/tests.py
@@ -5,7 +5,17 @@
import decimal
import unittest
-from django.template.defaultfilters import *
+from django.template.defaultfilters import (
+ add, addslashes, capfirst, center, cut, date, default, default_if_none,
+ dictsort, dictsortreversed, divisibleby, escape, escapejs_filter,
+ filesizeformat, first, fix_ampersands_filter, floatformat, force_escape,
+ get_digit, iriencode, join, length, length_is, linebreaksbr,
+ linebreaks_filter, linenumbers, ljust, lower, make_list,
+ phone2numeric_filter, pluralize, removetags, rjust, slice_filter, slugify,
+ stringformat, striptags, time, timesince_filter, timeuntil_filter, title,
+ truncatewords, truncatewords_html, unordered_list, upper, urlencode,
+ urlize, urlizetrunc, wordcount, wordwrap, yesno,
+)
from django.test import TestCase
from django.utils import six
from django.utils import translation
View
8 tests/forms_tests/tests/test_error_messages.py
@@ -4,7 +4,13 @@
import warnings
from django.core.files.uploadedfile import SimpleUploadedFile
-from django.forms import *
+from django.forms import (
+ BooleanField, CharField, ChoiceField, DateField, DateTimeField,
+ DecimalField, EmailField, FileField, FloatField, Form,
+ GenericIPAddressField, IntegerField, IPAddressField, ModelChoiceField,
+ ModelMultipleChoiceField, MultipleChoiceField, RegexField,
+ SplitDateTimeField, TimeField, URLField, utils, ValidationError,
+)
from django.test import TestCase
from django.utils.safestring import mark_safe
from django.utils.encoding import python_2_unicode_compatible
View
7 tests/forms_tests/tests/test_extra.py
@@ -4,7 +4,12 @@
import datetime
import warnings
-from django.forms import *
+from django.forms import (
+ CharField, DateField, EmailField, FileField, Form, GenericIPAddressField,
+ HiddenInput, ImageField, IPAddressField, MultipleChoiceField,
+ MultiValueField, MultiWidget, PasswordInput, SelectMultiple, SlugField,
+ SplitDateTimeField, SplitDateTimeWidget, TextInput, URLField,
+)
from django.forms.extras import SelectDateWidget
from django.forms.utils import ErrorList
from django.test import TestCase
View
9 tests/forms_tests/tests/test_fields.py
@@ -33,7 +33,14 @@
from decimal import Decimal
from django.core.files.uploadedfile import SimpleUploadedFile
-from django.forms import *
+from django.forms import (
+ BooleanField, CharField, ChoiceField, ComboField, DateField, DateTimeField,
+ DecimalField, EmailField, Field, FileField, FilePathField, FloatField,
+ Form, forms, HiddenInput, IntegerField, MultipleChoiceField,
+ NullBooleanField, NumberInput, PasswordInput, RadioSelect, RegexField,
+ SplitDateTimeField, TextInput, TimeField, TypedChoiceField,
+ TypedMultipleChoiceField, URLField, ValidationError, Widget,
+)
from django.test import SimpleTestCase
from django.utils import formats
from django.utils import six
View
8 tests/forms_tests/tests/test_forms.py
@@ -7,7 +7,13 @@
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.validators import RegexValidator
-from django.forms import *
+from django.forms import (
+ BooleanField, CharField, CheckboxSelectMultiple, ChoiceField, DateField,
+ EmailField, FileField, FloatField, Form, forms, HiddenInput, IntegerField,
+ MultipleChoiceField, MultipleHiddenInput, MultiValueField,
+ NullBooleanField, PasswordInput, RadioSelect, Select, SplitDateTimeField,
+ Textarea, TextInput, ValidationError, widgets,
+)
from django.http import QueryDict
from django.template import Template, Context
from django.test import TestCase
View
6 tests/forms_tests/tests/test_regressions.py
@@ -3,7 +3,11 @@
import warnings
-from django.forms import *
+from django.forms import (
+ CharField, ChoiceField, Form, HiddenInput, IntegerField, ModelForm,
+ ModelMultipleChoiceField, MultipleChoiceField, RadioSelect, Select,
+ TextInput,
+)
from django.test import TestCase
from django.utils.translation import ugettext_lazy, override
View
8 tests/forms_tests/tests/test_widgets.py
@@ -7,7 +7,13 @@
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.core.files.uploadedfile import SimpleUploadedFile
from django.core.urlresolvers import reverse
-from django.forms import *
+from django.forms import (
+ BooleanField, CheckboxInput, CheckboxSelectMultiple, ChoiceField,
+ ClearableFileInput, DateInput, DateTimeField, DateTimeInput, FileInput,
+ Form, HiddenInput, MultipleHiddenInput, MultiWidget, NullBooleanSelect,
+ PasswordInput, RadioSelect, Select, SelectMultiple, SplitDateTimeWidget,
+ Textarea, TextInput, TimeInput,
+)
from django.forms.widgets import RadioFieldRenderer
from django.utils import formats
from django.utils.safestring import mark_safe
View
8 tests/validators/tests.py
@@ -7,7 +7,13 @@
from unittest import TestCase
from django.core.exceptions import ValidationError
-from django.core.validators import *
+from django.core.validators import (
+ BaseValidator, EmailValidator, MaxLengthValidator, MaxValueValidator,
+ MinLengthValidator, MinValueValidator, RegexValidator, URLValidator,
+ validate_comma_separated_integer_list, validate_email, validate_integer,
+ validate_ipv46_address, validate_ipv4_address, validate_ipv6_address,
+ validate_slug,
+)
from django.test.utils import str_prefix
Please sign in to comment.
Something went wrong with that request. Please try again.