Remove usage of six

This commit is contained in:
Jérôme Lebleu
2020-01-07 10:16:54 +01:00
parent 369d05e1c3
commit 09434afd9e
12 changed files with 37 additions and 73 deletions
-1
View File
@@ -14,7 +14,6 @@ import django
from django.core import management
from django.template import Context, Template
from django.utils.encoding import smart_str
from django.utils.six.moves import input
from modoboa.core.commands import Command
from modoboa.lib.api_client import ModoAPIClient
@@ -1,7 +1,6 @@
"""Inactive accounts cleanup tool."""
from dateutil.relativedelta import relativedelta
from six.moves import input
from django.core.management.base import BaseCommand
from django.utils import timezone
+1 -3
View File
@@ -13,8 +13,6 @@ from random import Random
from django.utils.crypto import constant_time_compare
from django.utils.encoding import force_bytes, force_text
from six import with_metaclass
class MetaHasher(type):
"""
@@ -32,7 +30,7 @@ class MetaHasher(type):
return cls.name if not cls._weak else "{} (weak)".format(cls.name)
class PasswordHasher(with_metaclass(MetaHasher, object)):
class PasswordHasher(metaclass=MetaHasher):
"""
Base class of all hashers.
"""
+2 -1
View File
@@ -1,8 +1,9 @@
"""Tests for core application."""
from io import StringIO
import httmock
from dateutil.relativedelta import relativedelta
from six import StringIO
from django.core import management
from django.test import TestCase