summaryrefslogtreecommitdiff
path: root/searx/engines/openstreetmap.py
diff options
context:
space:
mode:
authordalf <alex@al-f.net>2014-12-07 16:37:56 +0100
committerdalf <alex@al-f.net>2014-12-07 16:37:56 +0100
commit7c13d630e4531630ce3c392a7d60752715742291 (patch)
tree332019feae5a215d2d54528308792560794d7aa5 /searx/engines/openstreetmap.py
parentffcec383b7355c6ca8b60da8579a43019d7d7e6b (diff)
downloadsearxng-7c13d630e4531630ce3c392a7d60752715742291.tar.gz
searxng-7c13d630e4531630ce3c392a7d60752715742291.zip
[fix] pep8 : engines (errors E121, E127, E128 and E501 still exist)
Diffstat (limited to 'searx/engines/openstreetmap.py')
-rw-r--r--searx/engines/openstreetmap.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/searx/engines/openstreetmap.py b/searx/engines/openstreetmap.py
index f727ca8ea..36b6011e7 100644
--- a/searx/engines/openstreetmap.py
+++ b/searx/engines/openstreetmap.py
@@ -39,16 +39,16 @@ def response(resp):
url = result_base_url.format(osm_type=osm_type,
osm_id=r['osm_id'])
- osm = {'type':osm_type,
- 'id':r['osm_id']}
+ osm = {'type': osm_type,
+ 'id': r['osm_id']}
- geojson = r.get('geojson')
+ geojson = r.get('geojson')
# if no geojson is found and osm_type is a node, add geojson Point
if not geojson and\
osm_type == 'node':
- geojson = {u'type':u'Point',
- u'coordinates':[r['lon'],r['lat']]}
+ geojson = {u'type': u'Point',
+ u'coordinates': [r['lon'], r['lat']]}
address_raw = r.get('address')
address = {}
@@ -59,20 +59,20 @@ def response(resp):
r['class'] == 'tourism' or\
r['class'] == 'leisure':
if address_raw.get('address29'):
- address = {'name':address_raw.get('address29')}
+ address = {'name': address_raw.get('address29')}
else:
- address = {'name':address_raw.get(r['type'])}
+ address = {'name': address_raw.get(r['type'])}
# add rest of adressdata, if something is already found
if address.get('name'):
- address.update({'house_number':address_raw.get('house_number'),
- 'road':address_raw.get('road'),
- 'locality':address_raw.get('city',
- address_raw.get('town',
- address_raw.get('village'))),
- 'postcode':address_raw.get('postcode'),
- 'country':address_raw.get('country'),
- 'country_code':address_raw.get('country_code')})
+ address.update({'house_number': address_raw.get('house_number'),
+ 'road': address_raw.get('road'),
+ 'locality': address_raw.get('city',
+ address_raw.get('town',
+ address_raw.get('village'))),
+ 'postcode': address_raw.get('postcode'),
+ 'country': address_raw.get('country'),
+ 'country_code': address_raw.get('country_code')})
else:
address = None