drop six and python2 support

This commit is contained in:
j 2023-07-27 13:07:13 +02:00
commit adad3be419
31 changed files with 54 additions and 426 deletions

View file

@ -3,8 +3,6 @@
from .. import cache
from ..utils import json
from six import string_types
def get_id(url):
return url.split("/")[-1]
@ -21,7 +19,7 @@ def get_data(id):
data[key] = details['metadata'][key]
if isinstance(data[key], list):
data[key] = data[key][0]
if isinstance(data[key], string_types):
if isinstance(data[key], str):
data[key] = data[key].strip()
if data[key][0] == '[' and data[key][-1] == ']':
data[key] = data[key][1:-1]