summaryrefslogtreecommitdiff
path: root/django/contrib/gis/measure.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/gis/measure.py')
-rw-r--r--django/contrib/gis/measure.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/contrib/gis/measure.py b/django/contrib/gis/measure.py
index 456f1c7277..90b316bb60 100644
--- a/django/contrib/gis/measure.py
+++ b/django/contrib/gis/measure.py
@@ -295,7 +295,7 @@ class Distance(MeasureBase):
'Yard (Indian)': 'indian_yd',
'Yard (Sears)': 'sears_yd'
}
- LALIAS = dict((k.lower(), v) for k, v in ALIAS.items())
+ LALIAS = {k.lower(): v for k, v in ALIAS.items()}
def __mul__(self, other):
if isinstance(other, self.__class__):
@@ -313,9 +313,9 @@ class Distance(MeasureBase):
class Area(MeasureBase):
STANDARD_UNIT = AREA_PREFIX + Distance.STANDARD_UNIT
# Getting the square units values and the alias dictionary.
- UNITS = dict(('%s%s' % (AREA_PREFIX, k), v ** 2) for k, v in Distance.UNITS.items())
- ALIAS = dict((k, '%s%s' % (AREA_PREFIX, v)) for k, v in Distance.ALIAS.items())
- LALIAS = dict((k.lower(), v) for k, v in ALIAS.items())
+ UNITS = {'%s%s' % (AREA_PREFIX, k): v ** 2 for k, v in Distance.UNITS.items()}
+ ALIAS = {k: '%s%s' % (AREA_PREFIX, v) for k, v in Distance.ALIAS.items()}
+ LALIAS = {k.lower(): v for k, v in ALIAS.items()}
def __truediv__(self, other):
if isinstance(other, NUMERIC_TYPES):