Skip to content

Commit

Permalink
Pep 8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Mar 1, 2015
1 parent ce6a7a0 commit a413b68
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions geocoder/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def debug(self):
def _exceptions(self):
pass

def tree(self): return defaultdict(self.tree)
def tree(self):
return defaultdict(self.tree)

def _encode(self, value):
# Encoding Value to for Python2/3 (default='utf-8')
Expand All @@ -170,6 +171,7 @@ def _build_tree(self, content, last=''):
self.parse[last][key] = self._encode(value)
else:
self.parse[key] = self._encode(value)

@property
def status(self):
if self.ok:
Expand Down Expand Up @@ -213,16 +215,15 @@ def confidence(self):
if self.bbox:
# Units are measured in Kilometers
distance = haversine(self.northeast, self.southwest)
for score, maximum in [
(10, 0.25),
(9, 0.5),
(8, 1),
(7, 5),
(6, 7.5),
(5, 10),
(4, 15),
(3, 20),
(2, 25)]:
for score, maximum in [(10, 0.25),
(9, 0.5),
(8, 1),
(7, 5),
(6, 7.5),
(5, 10),
(4, 15),
(3, 20),
(2, 25)]:
if distance < maximum:
return score
if distance >= 25:
Expand Down Expand Up @@ -331,4 +332,3 @@ def road(self):
@property
def route(self):
return self.street

0 comments on commit a413b68

Please sign in to comment.