mirror of
https://github.com/searxng/searxng.git
synced 2025-07-23 21:29:21 +02:00
[format.python] disable py code formatting for some hunks of code
Disable the python code formatting from python-black, where the readability of code suffers by formatting. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
c849731eb1
commit
fcdc2c2cd2
13 changed files with 114 additions and 68 deletions
|
@ -69,21 +69,25 @@ def image_url_cleanup(url_string):
|
|||
def _get_url(query, language, offset, time_range):
|
||||
if time_range in time_range_dict:
|
||||
search_path = search_string_with_time.format(
|
||||
# fmt: off
|
||||
query = urlencode({
|
||||
'q': query,
|
||||
'setmkt': language
|
||||
}),
|
||||
offset = offset,
|
||||
interval = time_range_dict[time_range]
|
||||
# fmt: on
|
||||
)
|
||||
else:
|
||||
# e.g. setmkt=de-de&setlang=de
|
||||
search_path = search_string.format(
|
||||
# fmt: off
|
||||
query = urlencode({
|
||||
'q': query,
|
||||
'setmkt': language
|
||||
}),
|
||||
offset = offset
|
||||
# fmt: on
|
||||
)
|
||||
return base_url + search_path
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue