mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 00:09:18 +02:00
[format.python] initial formatting of the python code
This patch was generated by black [1]:: make format.python [1] https://github.com/psf/black Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
fcdc2c2cd2
commit
3d96a9839a
184 changed files with 2800 additions and 2836 deletions
|
@ -8,7 +8,7 @@ IMDB_PREFIX_TO_URL_ID = {
|
|||
'mn': 'imdb_name',
|
||||
'ch': 'imdb_character',
|
||||
'co': 'imdb_company',
|
||||
'ev': 'imdb_event'
|
||||
'ev': 'imdb_event',
|
||||
}
|
||||
HTTP_WIKIMEDIA_IMAGE = 'http://commons.wikimedia.org/wiki/Special:FilePath/'
|
||||
|
||||
|
@ -20,9 +20,9 @@ def get_imdb_url_id(imdb_item_id):
|
|||
|
||||
def get_wikimedia_image_id(url):
|
||||
if url.startswith(HTTP_WIKIMEDIA_IMAGE):
|
||||
return url[len(HTTP_WIKIMEDIA_IMAGE):]
|
||||
return url[len(HTTP_WIKIMEDIA_IMAGE) :]
|
||||
if url.startswith('File:'):
|
||||
return url[len('File:'):]
|
||||
return url[len('File:') :]
|
||||
return url
|
||||
|
||||
|
||||
|
@ -52,10 +52,12 @@ def get_external_url(url_id, item_id, alternative="default"):
|
|||
|
||||
|
||||
def get_earth_coordinates_url(latitude, longitude, osm_zoom, alternative='default'):
|
||||
url = get_external_url('map', None, alternative)\
|
||||
.replace('${latitude}', str(latitude))\
|
||||
.replace('${longitude}', str(longitude))\
|
||||
url = (
|
||||
get_external_url('map', None, alternative)
|
||||
.replace('${latitude}', str(latitude))
|
||||
.replace('${longitude}', str(longitude))
|
||||
.replace('${zoom}', str(osm_zoom))
|
||||
)
|
||||
return url
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue