Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #21302 -- Fixed unused imports and import *.
- Loading branch information
Showing
116 changed files
with
248 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
# Getting the normal admin routines, classes, and `site` instance. | ||
from django.contrib.admin import autodiscover, site, AdminSite, ModelAdmin, StackedInline, TabularInline, HORIZONTAL, VERTICAL | ||
|
||
from django.contrib.admin import ( # NOQA: flake8 detects only the last __all__ | ||
autodiscover, site, AdminSite, ModelAdmin, StackedInline, TabularInline, | ||
HORIZONTAL, VERTICAL, | ||
) | ||
# Geographic admin options classes and widgets. | ||
from django.contrib.gis.admin.options import GeoModelAdmin | ||
from django.contrib.gis.admin.widgets import OpenLayersWidget | ||
from django.contrib.gis.admin.options import GeoModelAdmin # NOQA | ||
from django.contrib.gis.admin.widgets import OpenLayersWidget # NOQA | ||
|
||
__all__ = [ | ||
"autodiscover", "site", "AdminSite", "ModelAdmin", "StackedInline", | ||
"TabularInline", "HORIZONTAL", "VERTICAL", | ||
"GeoModelAdmin", "OpenLayersWidget", "HAS_OSM", | ||
] | ||
|
||
try: | ||
from django.contrib.gis.admin.options import OSMGeoAdmin | ||
HAS_OSM = True | ||
__all__ += ['OSMGeoAdmin'] | ||
except ImportError: | ||
HAS_OSM = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# Want to get everything from the 'normal' models package. | ||
from django.db.models import * | ||
from django.db.models import * # NOQA | ||
|
||
# Geographic aggregate functions | ||
from django.contrib.gis.db.models.aggregates import * | ||
from django.contrib.gis.db.models.aggregates import * # NOQA | ||
|
||
# The GeoManager | ||
from django.contrib.gis.db.models.manager import GeoManager | ||
from django.contrib.gis.db.models.manager import GeoManager # NOQA | ||
|
||
# The geographic-enabled fields. | ||
from django.contrib.gis.db.models.fields import ( | ||
from django.contrib.gis.db.models.fields import ( # NOQA | ||
GeometryField, PointField, LineStringField, PolygonField, | ||
MultiPointField, MultiLineStringField, MultiPolygonField, | ||
GeometryCollectionField) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
from django.contrib.gis.db.models.sql.conversion import AreaField, DistanceField, GeomField | ||
from django.contrib.gis.db.models.sql.query import GeoQuery | ||
from django.contrib.gis.db.models.sql.where import GeoWhereNode | ||
|
||
__all__ = [ | ||
'AreaField', 'DistanceField', 'GeomField', 'GeoQuery', 'GeoWhereNode', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from django.forms import * | ||
from .fields import (GeometryField, GeometryCollectionField, PointField, | ||
from django.forms import * # NOQA | ||
from .fields import (GeometryField, GeometryCollectionField, PointField, # NOQA | ||
MultiPointField, LineStringField, MultiLineStringField, PolygonField, | ||
MultiPolygonField) | ||
from .widgets import BaseGeometryWidget, OpenLayersWidget, OSMWidget | ||
from .widgets import BaseGeometryWidget, OpenLayersWidget, OSMWidget # NOQA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
from django.contrib.gis.geos import ( | ||
GEOSGeometry as Geometry, GEOSException as GeometryException) | ||
|
||
__all__ = ['Geometry', 'GeometryException'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Geo-enabled Sitemap classes. | ||
from django.contrib.gis.sitemaps.georss import GeoRSSSitemap | ||
from django.contrib.gis.sitemaps.kml import KMLSitemap, KMZSitemap | ||
|
||
__all__ = ['GeoRSSSitemap', 'KMLSitemap', 'KMZSitemap'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from django.contrib.messages.api import * | ||
from django.contrib.messages.constants import * | ||
from django.contrib.messages.api import * # NOQA | ||
from django.contrib.messages.constants import * # NOQA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
"Database cache backend." | ||
import base64 | ||
import time | ||
from datetime import datetime | ||
|
||
try: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
from django.core.files.base import File | ||
|
||
__all__ = ['File'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.