Skip to content

Commit

Permalink
Remove __future__ imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphje committed May 4, 2020
1 parent d75c928 commit 122028e
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 28 deletions.
1 change: 0 additions & 1 deletion internationalflavor/countries/_cldr_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is automatically generated based on the English CLDR file.
# Do not edit manually.

from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _

COUNTRY_NAMES = {
Expand Down
2 changes: 0 additions & 2 deletions internationalflavor/countries/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
PR Puerto Rico
"""

from __future__ import absolute_import
from __future__ import unicode_literals
from django.utils.functional import lazy
from ._cldr_data import COUNTRY_NAMES

Expand Down
3 changes: 0 additions & 3 deletions internationalflavor/iban/data.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"""Contains a list of all known IBAN regexes.
"""

from __future__ import absolute_import
from __future__ import unicode_literals

IBAN_REGEXES = {
'AD': r'^\d{10}[0-9A-Z]{12}$', # AD2!n4!n4!n12!c
'AE': r'^\d{21}$', # AE2!n3!n16!n
Expand Down
15 changes: 6 additions & 9 deletions internationalflavor/iban/validators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals

import re
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
Expand All @@ -25,7 +22,7 @@ class IBANValidator(object):
are localized characters (the so-called BBAN).
:param countries: If set, the list of source countries will be limited to the provided list. Otherwise, all
available IBANs are included (with the exception of Nordea IBANs if ``accept_nordea_extensions`` is not set).
available IBANs are included (with the exception of experimental IBANs if ``accept_experimental`` is not set).
:param exclude: You can use this parameter to exclude items from the list of countries.
Expand All @@ -34,14 +31,14 @@ class IBANValidator(object):
to perform direct debits, you can set this to True. This is equivalent to setting the exclude list to all
countries without SEPA.
:param bool accept_nordea_extensions: By default, this validator will validate any IBAN that is recognized by the
SWIFT organization, but Nordea has specified a few additional IBAN formats. By setting this parameter to True,
these extensions are also allowed.
:param bool accept_experimental: By default, this validator will validate any IBAN that is recognized by the
SWIFT organization, but SWIFT has specified a few additional IBAN formats and defined them as 'experimental'.
By setting this parameter to True, these extensions are also allowed.
.. warning::
The validation of the Nordea extensions may be wrong for some countries, as there is no standard for these
numbers.
The validation of the experimental numbers may be wrong for some countries, as only their length is published
by the SWIFT organization
"""

def __init__(self, countries=None, exclude=None, sepa_only=False, accept_experimental=False):
Expand Down
1 change: 0 additions & 1 deletion internationalflavor/timezone/_cldr_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# This file is automatically generated based on the English CLDR file.
# Do not edit manually.

from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _

METAZONE_MAPPING_FROM_TZ = {
Expand Down
2 changes: 0 additions & 2 deletions internationalflavor/timezone/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import, division

import datetime

from django.core.exceptions import ImproperlyConfigured
Expand Down
2 changes: 0 additions & 2 deletions internationalflavor/timezone/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals
import datetime
from django.core.exceptions import ValidationError
from django.db import models
Expand Down
3 changes: 0 additions & 3 deletions internationalflavor/vat_number/validators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import absolute_import
from __future__ import unicode_literals

import re
import socket
import urllib.request
Expand Down
4 changes: 0 additions & 4 deletions scripts/datafromcldr.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import argparse
import json
import os
import sys
import zipfile
import django
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
Expand Down Expand Up @@ -81,7 +79,6 @@ def handle(self, *args, **options):
f.write(b"# coding=utf-8\n")
f.write(b"# This file is automatically generated based on the English CLDR file.\n")
f.write(b"# Do not edit manually.\n\n")
f.write(b"from __future__ import unicode_literals\n")
f.write(b"from django.utils.translation import ugettext_lazy as _\n\n")

f.write(b"COUNTRY_NAMES = {\n")
Expand Down Expand Up @@ -131,7 +128,6 @@ def handle(self, *args, **options):
f.write(b"# coding=utf-8\n")
f.write(b"# This file is automatically generated based on the English CLDR file.\n")
f.write(b"# Do not edit manually.\n\n")
f.write(b"from __future__ import unicode_literals\n")
f.write(b"from django.utils.translation import ugettext_lazy as _\n\n")

f.write(b"METAZONE_MAPPING_FROM_TZ = {\n")
Expand Down
1 change: 0 additions & 1 deletion scripts/mergemessages.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import argparse
import os
import sys

Expand Down

0 comments on commit 122028e

Please sign in to comment.