Remove some python2 --> python3 leftovers

Remove some __future__ imports and the six compability layer (which was
not mentioned in the requirements.txt anyway).
This commit is contained in:
Sebastian Lohff 2022-01-22 16:47:07 +01:00
parent e5465632b4
commit 970a3ae517
4 changed files with 4 additions and 10 deletions

View File

@ -1,6 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function
# prepare environment # prepare environment
import sys import sys
sys.path.append("..") sys.path.append("..")

View File

@ -1,5 +1,3 @@
from __future__ import unicode_literals
from django.apps import AppConfig from django.apps import AppConfig

View File

@ -1,5 +1,3 @@
from __future__ import unicode_literals
import datetime import datetime
from django.contrib.auth.models import AbstractUser from django.contrib.auth.models import AbstractUser

View File

@ -1,7 +1,6 @@
from django.core import validators from django.core import validators
from django.utils import six
from django.utils.deconstruct import deconstructible from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import gettext_lazy as _
import re import re
@ -13,7 +12,8 @@ class CallUsernameValidator(validators.RegexValidator):
'Enter a valid Callsign as Username, ALL UPPERCASE, if needed with -1 / -2,' 'Enter a valid Callsign as Username, ALL UPPERCASE, if needed with -1 / -2,'
'e.g. DL7BST, DN1BER-1, DL/OE1FOO.' 'e.g. DL7BST, DN1BER-1, DL/OE1FOO.'
) )
flags = re.ASCII if six.PY3 else 0 flags = re.ASCII
@deconstructible @deconstructible
class CallLogValidator(validators.RegexValidator): class CallLogValidator(validators.RegexValidator):
@ -22,4 +22,4 @@ class CallLogValidator(validators.RegexValidator):
'Enter a valid callsign, ALL UPPERCASE, if needed with -1 / -2,' 'Enter a valid callsign, ALL UPPERCASE, if needed with -1 / -2,'
'e.g. DL7BST, DN1BER-1, DL/OE1FOO, DN1FTW-1/p' 'e.g. DL7BST, DN1BER-1, DL/OE1FOO, DN1FTW-1/p'
) )
flags = re.ASCII if six.PY3 else 0 flags = re.ASCII