mirror of
https://github.com/searxng/searxng.git
synced 2025-12-23 04:00:02 +00:00
Drop Python 2 (1/n): remove unicode string and url_utils
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user