mirror of
https://github.com/searxng/searxng.git
synced 2025-07-12 07:49:22 +02:00
Drop Python 2 (1/n): remove unicode string and url_utils
This commit is contained in:
parent
272158944b
commit
1022228d95
112 changed files with 388 additions and 535 deletions
|
@ -1,11 +1,8 @@
|
|||
from collections import Iterable
|
||||
from json import loads
|
||||
from sys import version_info
|
||||
from searx.url_utils import urlencode
|
||||
from urllib.parse import urlencode
|
||||
from searx.utils import to_string
|
||||
|
||||
if version_info[0] == 3:
|
||||
unicode = str
|
||||
|
||||
search_url = None
|
||||
url_query = None
|
||||
|
@ -37,8 +34,6 @@ def iterate(iterable):
|
|||
def is_iterable(obj):
|
||||
if type(obj) == str:
|
||||
return False
|
||||
if type(obj) == unicode:
|
||||
return False
|
||||
return isinstance(obj, Iterable)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue