Skip to content

Commit d9231d1

Browse files
author
stepshal
committed
Fix whitespaces
1 parent baab6bc commit d9231d1

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

examples/basic_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
categories = ['general'] # optional
2+
categories = ['general'] # optional
33

44

55
def request(query, params):

utils/fabfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def init():
8989
sudo('git clone https://github.com/asciimoo/searx')
9090

9191
sudo('chown -R {user}:{user} {searx_dir}'.format(user=current_user, searx_dir=searx_dir))
92-
put(StringIO(uwsgi_file), searx_dir+'/uwsgi.ini')
92+
put(StringIO(uwsgi_file), searx_dir + '/uwsgi.ini')
9393
sudo('ln -s {0}/uwsgi.ini /etc/uwsgi/apps-enabled/searx.ini'.format(searx_dir))
9494

9595
run('virtualenv {0}'.format(searx_ve_dir))

utils/fetch_currencies.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010

1111
url_template = 'https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&{query}&props=labels%7Cdatatype%7Cclaims%7Caliases&languages=' + '|'.join(languages)
1212
url_wmflabs_template = 'http://wdq.wmflabs.org/api?q='
13-
url_wikidata_search_template='http://www.wikidata.org/w/api.php?action=query&list=search&format=json&srnamespace=0&srprop=sectiontitle&{query}'
13+
url_wikidata_search_template = 'http://www.wikidata.org/w/api.php?action=query&list=search&format=json&srnamespace=0&srprop=sectiontitle&{query}'
1414

1515
wmflabs_queries = [
16-
'CLAIM[31:8142]', # all devise
16+
'CLAIM[31:8142]', # all devise
1717
]
1818

1919
db = {
20-
'iso4217' : {
21-
},
22-
'names' : {
23-
}
20+
'iso4217': {
21+
},
22+
'names': {
23+
}
2424
}
2525

2626

@@ -29,7 +29,7 @@ def remove_accents(data):
2929

3030

3131
def normalize_name(name):
32-
return re.sub(' +',' ', remove_accents(name.lower()).replace('-', ' '))
32+
return re.sub(' +', ' ', remove_accents(name.lower()).replace('-', ' '))
3333

3434

3535
def add_currency_name(name, iso4217):
@@ -51,7 +51,7 @@ def add_currency_name(name, iso4217):
5151
if iso4217_set is not None and iso4217 not in iso4217_set:
5252
db_names[name].append(iso4217)
5353
else:
54-
db_names[name] = [ iso4217 ]
54+
db_names[name] = [iso4217]
5555

5656

5757
def add_currency_label(label, iso4217, language):
@@ -96,7 +96,7 @@ def parse_currency(data):
9696

9797

9898
def fetch_data(wikidata_ids):
99-
url = url_template.format(query=urlencode({'ids' : '|'.join(wikidata_ids)}))
99+
url = url_template.format(query=urlencode({'ids': '|'.join(wikidata_ids)}))
100100
htmlresponse = get(url)
101101
jsonresponse = json.loads(htmlresponse.content)
102102
entities = jsonresponse.get('entities', {})

0 commit comments

Comments
 (0)