diff options
author | Wojciech Polak <wojciechpolak@gmail.com> | 2021-03-30 14:13:25 +0200 |
---|---|---|
committer | Wojciech Polak <wojciechpolak@gmail.com> | 2021-03-30 14:37:20 +0200 |
commit | 41f30aa2c6ece5c3f21aa4c752519e8023c4047d (patch) | |
tree | faf7be3a479f7a09eeb1739aa608427c060051f3 | |
parent | fe2d2abc1266ecbb397392c45bfd435296f71ec3 (diff) | |
download | glifestream-41f30aa2c6ece5c3f21aa4c752519e8023c4047d.tar.gz glifestream-41f30aa2c6ece5c3f21aa4c752519e8023c4047d.tar.bz2 |
Remove Six
-rw-r--r-- | .pylintrc | 2 | ||||
-rw-r--r-- | glifestream/apis/mail.py | 5 | ||||
-rw-r--r-- | glifestream/stream/media.py | 3 | ||||
-rw-r--r-- | glifestream/usettings/views.py | 3 | ||||
-rw-r--r-- | glifestream/utils/html.py | 1 | ||||
-rw-r--r-- | glifestream/utils/time.py | 3 |
6 files changed, 6 insertions, 11 deletions
@@ -400,7 +400,7 @@ init-import=no # List of qualified module names which can have objects that can redefine # builtins. -redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io +redefining-builtins-modules=past.builtins,future.builtins,builtins,io [SPELLING] diff --git a/glifestream/apis/mail.py b/glifestream/apis/mail.py index ebb59ab..5aff7a4 100644 --- a/glifestream/apis/mail.py +++ b/glifestream/apis/mail.py @@ -20,7 +20,6 @@ from email.header import decode_header, make_header from django.conf import settings from django.core.files.uploadedfile import TemporaryUploadedFile from django.utils.datastructures import MultiValueDict -from django.utils import six from glifestream.apis import selfposts from glifestream.stream.models import Service @@ -44,7 +43,7 @@ class API: check = getattr(settings, 'EMAIL2POST_CHECK', {}) for lhs in check: - v = six.text_type(make_header(decode_header(msg.get(lhs, '')))) + v = str(make_header(decode_header(msg.get(lhs, '')))) if not check[lhs] in v: return 77 # EX_NOPERM @@ -81,7 +80,7 @@ class API: subject = msg.get('Subject', None) if subject: hdr = make_header(decode_header(subject)) - args['title'] = six.text_type(hdr) + args['title'] = str(hdr) # Mail subject may contain @foo, a selfposts' class name for which # this message is post to. diff --git a/glifestream/stream/media.py b/glifestream/stream/media.py index 4253915..795c37b 100644 --- a/glifestream/stream/media.py +++ b/glifestream/stream/media.py @@ -21,7 +21,6 @@ import tempfile import time import shutil from django.conf import settings -from django.utils import six from django.utils.encoding import force_bytes from glifestream.stream.models import Media from glifestream.utils import httpclient @@ -138,7 +137,7 @@ def transform_to_local(entry): def mrss_init(mblob=None): if mblob: - if isinstance(mblob, six.string_types): + if isinstance(mblob, str): mblob = json.loads(mblob) if 'content' in mblob: return mblob diff --git a/glifestream/usettings/views.py b/glifestream/usettings/views.py index c037b87..61e5584 100644 --- a/glifestream/usettings/views.py +++ b/glifestream/usettings/views.py @@ -23,7 +23,6 @@ from django.http import HttpResponse from django.http import HttpResponseForbidden from django.http import HttpResponseRedirect from django.forms import ModelForm -from django.utils import six from django.utils.translation import ugettext as _ from django.views.decorators.cache import never_cache from glifestream.stream.models import Service, List @@ -266,7 +265,7 @@ def oauth(request, **args): return render(request, 'oauth.html', {'page': page, 'is_secure': request.is_secure(), - 'title': six.text_type(service), + 'title': str(service), 'api_help': api_help, 'callback_url': callback_url, 'phase': c.db.phase, diff --git a/glifestream/utils/html.py b/glifestream/utils/html.py index 7f4979b..cb22c35 100644 --- a/glifestream/utils/html.py +++ b/glifestream/utils/html.py @@ -15,7 +15,6 @@ import re from urllib.parse import quote, unquote, urlsplit, urlunsplit -from django.utils import six from django.utils.encoding import force_str, force_text from django.utils.safestring import mark_safe, SafeData diff --git a/glifestream/utils/time.py b/glifestream/utils/time.py index 46a28f7..a7aaa6f 100644 --- a/glifestream/utils/time.py +++ b/glifestream/utils/time.py @@ -15,11 +15,10 @@ import datetime import calendar -from django.utils import six def mtime(t): - if isinstance(t, six.string_types): + if isinstance(t, str): t = datetime.datetime.strptime(t, '%Y-%m-%d %H:%M:%S').timetuple() return datetime.datetime.utcfromtimestamp(calendar.timegm(t)) |