Remove six imports

This commit is contained in:
Adrian Moennich 2020-11-10 13:15:19 +01:00
parent c70e6804df
commit 702b85e158
4 changed files with 6 additions and 13 deletions

View File

@ -7,8 +7,7 @@
from decimal import Decimal
from six.moves.urllib.parse import quote_plus
from urllib.parse import quote_plus
from indico.modules.events.registration.placeholders.registrations import IDPlaceholder
from indico.util.placeholders import ParametrizedPlaceholder, Placeholder

View File

@ -7,8 +7,7 @@
from operator import itemgetter
from six.moves.urllib.parse import quote
from urllib.parse import quote
from indico_piwik.queries.base import PiwikQueryReportEventBase
from indico_piwik.queries.utils import get_json_from_remote_server, reduce_json, stringify_seconds
@ -34,9 +33,7 @@ class PiwikQueryReportEventMetricVisitsBase(PiwikQueryReportEventMetricBase):
class PiwikQueryReportEventMetricDownloads(PiwikQueryReportEventMetricBase):
def call(self, download_url, **query_params):
return super().call(method='Actions.getDownload',
downloadUrl=quote(download_url),
**query_params)
return super().call(method='Actions.getDownload', downloadUrl=quote(download_url), **query_params)
def get_result(self, download_url):
result = get_json_from_remote_server(self.call, download_url=download_url, segmentation_enabled=False)

View File

@ -6,8 +6,7 @@
# see the LICENSE file for more details.
from datetime import datetime
from six.moves.urllib.parse import quote
from urllib.parse import quote
from indico.core.celery import celery

View File

@ -5,10 +5,8 @@
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from urllib.parse import urlencode
import six.moves.urllib.error
import six.moves.urllib.parse
import six.moves.urllib.request
from sqlalchemy.event import listens_for
from sqlalchemy.orm.attributes import flag_modified
@ -62,7 +60,7 @@ class VidyoExtension(db.Model):
url = self.vc_room.data['url']
custom_url_tpl = VidyoPlugin.settings.get('client_chooser_url')
if custom_url_tpl:
return custom_url_tpl + '?' + six.moves.urllib.parse.urlencode({'url': url})
return custom_url_tpl + '?' + urlencode({'url': url})
return url
def __repr__(self):