Skip to content

Commit b67ab75

Browse files
committed
Fixed assorted flake8 errors.
1 parent 695bc0d commit b67ab75

File tree

38 files changed

+92
-73
lines changed

38 files changed

+92
-73
lines changed

django/conf/locale/id/formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
MONTH_DAY_FORMAT = 'j F'
1313
SHORT_DATE_FORMAT = 'd-m-Y'
1414
SHORT_DATETIME_FORMAT = 'd-m-Y G.i.s'
15-
FIRST_DAY_OF_WEEK = 1 #Monday
15+
FIRST_DAY_OF_WEEK = 1 # Monday
1616

1717
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
1818
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior

django/conf/locale/lv/formats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
MONTH_DAY_FORMAT = 'j. F'
1313
SHORT_DATE_FORMAT = r'j.m.Y'
1414
SHORT_DATETIME_FORMAT = 'j.m.Y H:i:s'
15-
FIRST_DAY_OF_WEEK = 1 #Monday
15+
FIRST_DAY_OF_WEEK = 1 # Monday
1616

1717
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
1818
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior

django/contrib/gis/admin/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class OLMap(self.widget):
101101
'num_zoom' : self.num_zoom,
102102
'max_zoom' : self.max_zoom,
103103
'min_zoom' : self.min_zoom,
104-
'units' : self.units, #likely shoud get from object
104+
'units' : self.units, # likely should get from object
105105
'max_resolution' : self.max_resolution,
106106
'max_extent' : self.max_extent,
107107
'modifiable' : self.modifiable,

django/contrib/gis/gdal/geometries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def __setstate__(self, state):
151151
def from_bbox(cls, bbox):
152152
"Constructs a Polygon from a bounding box (4-tuple)."
153153
x0, y0, x1, y1 = bbox
154-
return OGRGeometry( 'POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' % (
154+
return OGRGeometry( 'POLYGON((%s %s, %s %s, %s %s, %s %s, %s %s))' % (
155155
x0, y0, x0, y1, x1, y1, x1, y0, x0, y0) )
156156

157157
### Geometry set-like operations ###

django/contrib/gis/gdal/srs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def __getitem__(self, target):
105105
doesn't exist. Can also take a tuple as a parameter, (target, child),
106106
where child is the index of the attribute in the WKT. For example:
107107
108-
>>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY["EPSG","4326"]]')
108+
>>> wkt = 'GEOGCS["WGS 84", DATUM["WGS_1984, ... AUTHORITY["EPSG","4326"]]'
109109
>>> srs = SpatialReference(wkt) # could also use 'WGS84', or 4326
110110
>>> print(srs['GEOGCS'])
111111
WGS 84

django/contrib/gis/gdal/tests/test_geom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def test07a_polygons(self):
204204
"Testing Polygon objects."
205205

206206
# Testing `from_bbox` class method
207-
bbox = (-180,-90,180,90)
207+
bbox = (-180, -90, 180, 90)
208208
p = OGRGeometry.from_bbox( bbox )
209209
self.assertEqual(bbox, p.extent)
210210

django/contrib/gis/geos/polygon.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ def __init__(self, *args, **kwargs):
1717
1818
Examples of initialization, where shell, hole1, and hole2 are
1919
valid LinearRing geometries:
20+
>>> from django.contrib.gis.geos import LinearRing, Polygon
21+
>>> shell = hole1 = hole2 = LinearRing()
2022
>>> poly = Polygon(shell, hole1, hole2)
2123
>>> poly = Polygon(shell, (hole1, hole2))
2224
23-
Example where a tuple parameters are used:
25+
>>> # Example where a tuple parameters are used:
2426
>>> poly = Polygon(((0, 0), (0, 10), (10, 10), (0, 10), (0, 0)),
25-
((4, 4), (4, 6), (6, 6), (6, 4), (4, 4)))
27+
... ((4, 4), (4, 6), (6, 6), (6, 4), (4, 4)))
2628
"""
2729
if not args:
2830
raise TypeError('Must provide at least one LinearRing, or a tuple, to initialize a Polygon.')

django/contrib/gis/geos/tests/test_geos_mutation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ def api_get_extent(x): return x.extent
3333
def api_get_area(x): return x.area
3434
def api_get_length(x): return x.length
3535

36-
geos_function_tests = [ val for name, val in vars().items()
37-
if hasattr(val, '__call__')
38-
and name.startswith('api_get_') ]
36+
geos_function_tests = [val for name, val in vars().items()
37+
if hasattr(val, '__call__')
38+
and name.startswith('api_get_')]
3939

4040

4141
@skipUnless(HAS_GEOS, "Geos is required.")

django/contrib/gis/geos/tests/test_mutable_list.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@ def __init__(self, i_list, *args, **kwargs):
1616
self._list = self._mytype(i_list)
1717
super(UserListA, self).__init__(*args, **kwargs)
1818

19-
def __len__(self): return len(self._list)
19+
def __len__(self):
20+
return len(self._list)
2021

21-
def __str__(self): return str(self._list)
22+
def __str__(self):
23+
return str(self._list)
2224

23-
def __repr__(self): return repr(self._list)
25+
def __repr__(self):
26+
return repr(self._list)
2427

2528
def _set_list(self, length, items):
2629
# this would work:

django/contrib/gis/maps/google/gmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def __init__(self, key=None, api_url=None, version=None,
8181
# level and a center coordinate are provided with polygons/polylines,
8282
# no automatic determination will occur.
8383
self.calc_zoom = False
84-
if self.polygons or self.polylines or self.markers:
84+
if self.polygons or self.polylines or self.markers:
8585
if center is None or zoom is None:
8686
self.calc_zoom = True
8787

0 commit comments

Comments
 (0)