From 72ac5a10b2697bb48c90b8c1e3bae545d537cd13 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 6 Jan 2020 07:26:09 -0800 Subject: [PATCH] Run isort as part of CI (#1097) * Run isort as part of CI isort was already configured in commit 93c937505a4009fcd95aa5e84ee44831330d59ff. Now include isort in the tox matrix and run it during CI. Fix faker/factory.py to avoid the circular dependency. Fix isort early to reduce changes when dropping Python 2 support. Refs #1063 * Simplify CircleCI configuration Avoids creating a virtualenv directory inside the project directory. --- .circleci/config.yml | 6 ++--- .travis.yml | 1 + faker/__init__.py | 2 +- faker/factory.py | 2 +- faker/generator.py | 1 + faker/providers/address/__init__.py | 3 +-- faker/providers/address/cs_CZ/__init__.py | 1 + faker/providers/address/de/__init__.py | 1 + faker/providers/address/de_AT/__init__.py | 1 + faker/providers/address/de_DE/__init__.py | 1 + faker/providers/address/en/__init__.py | 1 + faker/providers/address/en_CA/__init__.py | 2 ++ faker/providers/address/en_GB/__init__.py | 1 + faker/providers/address/en_NZ/__init__.py | 1 + faker/providers/address/en_PH/__init__.py | 2 ++ faker/providers/address/en_US/__init__.py | 1 + faker/providers/address/es/__init__.py | 1 + faker/providers/address/es_ES/__init__.py | 1 + faker/providers/address/es_MX/__init__.py | 1 + faker/providers/address/fa_IR/__init__.py | 1 + faker/providers/address/fi_FI/__init__.py | 1 + faker/providers/address/fr_CH/__init__.py | 1 + faker/providers/address/fr_FR/__init__.py | 1 + faker/providers/address/hi_IN/__init__.py | 1 + faker/providers/address/hr_HR/__init__.py | 1 + faker/providers/address/hu_HU/__init__.py | 1 + faker/providers/address/hy_AM/__init__.py | 1 + faker/providers/address/id_ID/__init__.py | 1 + faker/providers/address/it_IT/__init__.py | 1 + faker/providers/address/ko_KR/__init__.py | 1 + faker/providers/address/nl_BE/__init__.py | 1 + faker/providers/address/nl_NL/__init__.py | 1 + faker/providers/address/pl_PL/__init__.py | 1 + faker/providers/address/pt_BR/__init__.py | 1 + faker/providers/address/pt_PT/__init__.py | 1 + faker/providers/address/ru_RU/__init__.py | 1 + faker/providers/address/sk_SK/__init__.py | 1 + faker/providers/address/sl_SI/__init__.py | 1 + faker/providers/address/sv_SE/__init__.py | 1 + faker/providers/address/ta_IN/__init__.py | 1 + faker/providers/address/zh_CN/__init__.py | 1 + faker/providers/address/zh_TW/__init__.py | 1 + faker/providers/automotive/__init__.py | 6 +++-- faker/providers/automotive/ar_JO/__init__.py | 1 + faker/providers/automotive/ar_PS/__init__.py | 1 + faker/providers/automotive/de_DE/__init__.py | 4 +++- faker/providers/automotive/en_CA/__init__.py | 1 + faker/providers/automotive/en_GB/__init__.py | 1 + faker/providers/automotive/en_NZ/__init__.py | 1 + faker/providers/automotive/en_PH/__init__.py | 2 ++ faker/providers/automotive/en_US/__init__.py | 1 + faker/providers/automotive/hu_HU/__init__.py | 1 + faker/providers/automotive/id_ID/__init__.py | 1 + faker/providers/automotive/pl_PL/__init__.py | 1 + faker/providers/automotive/ru_RU/__init__.py | 1 + faker/providers/automotive/sv_SE/__init__.py | 1 + faker/providers/bank/__init__.py | 6 +++-- faker/providers/barcode/__init__.py | 1 + faker/providers/color/__init__.py | 3 ++- faker/providers/color/ar_PS/__init__.py | 1 + faker/providers/color/color.py | 1 - faker/providers/color/fr_FR/__init__.py | 1 + faker/providers/color/hy_AM/__init__.py | 2 ++ faker/providers/color/pt_BR/__init__.py | 1 + faker/providers/color/ru_RU/__init__.py | 1 + faker/providers/color/th_TH/__init__.py | 1 + faker/providers/company/__init__.py | 2 +- faker/providers/company/bg_BG/__init__.py | 1 + faker/providers/company/cs_CZ/__init__.py | 1 + faker/providers/company/de_DE/__init__.py | 1 + faker/providers/company/en_PH/__init__.py | 2 ++ faker/providers/company/en_US/__init__.py | 1 + faker/providers/company/es_MX/__init__.py | 1 + faker/providers/company/fa_IR/__init__.py | 1 + faker/providers/company/fi_FI/__init__.py | 1 + faker/providers/company/fil_PH/__init__.py | 2 ++ faker/providers/company/fr_CH/__init__.py | 1 + faker/providers/company/fr_FR/__init__.py | 1 + faker/providers/company/hr_HR/__init__.py | 1 + faker/providers/company/hu_HU/__init__.py | 1 + faker/providers/company/hy_AM/__init__.py | 1 + faker/providers/company/id_ID/__init__.py | 1 + faker/providers/company/it_IT/__init__.py | 1 + faker/providers/company/ja_JP/__init__.py | 1 + faker/providers/company/ko_KR/__init__.py | 1 + faker/providers/company/nl_NL/__init__.py | 1 + faker/providers/company/no_NO/__init__.py | 1 + faker/providers/company/pl_PL/__init__.py | 1 + faker/providers/company/pt_BR/__init__.py | 1 + faker/providers/company/pt_PT/__init__.py | 1 + faker/providers/company/ru_RU/__init__.py | 1 + faker/providers/company/sk_SK/__init__.py | 1 + faker/providers/company/sl_SI/__init__.py | 1 + faker/providers/company/sv_SE/__init__.py | 1 + faker/providers/company/zh_CN/__init__.py | 1 + faker/providers/company/zh_TW/__init__.py | 1 + faker/providers/credit_card/__init__.py | 1 + faker/providers/credit_card/fa_IR/__init__.py | 5 +++-- faker/providers/date_time/__init__.py | 2 +- faker/providers/date_time/ar_AA/__init__.py | 1 - faker/providers/date_time/ar_EG/__init__.py | 1 - faker/providers/date_time/en_PH/__init__.py | 1 + faker/providers/date_time/fil_PH/__init__.py | 1 + faker/providers/date_time/hi_IN/__init__.py | 1 + faker/providers/date_time/hu_HU/__init__.py | 1 + faker/providers/date_time/hy_AM/__init__.py | 1 + faker/providers/date_time/id_ID/__init__.py | 1 + faker/providers/date_time/ta_IN/__init__.py | 1 + faker/providers/file/__init__.py | 1 + faker/providers/geo/de_AT/__init__.py | 1 + faker/providers/geo/pt_PT/__init__.py | 1 + faker/providers/internet/__init__.py | 7 +++--- faker/providers/internet/ar_AA/__init__.py | 1 + faker/providers/internet/bg_BG/__init__.py | 1 + faker/providers/internet/bs_BA/__init__.py | 1 + faker/providers/internet/cs_CZ/__init__.py | 1 + faker/providers/internet/de_AT/__init__.py | 1 + faker/providers/internet/de_DE/__init__.py | 1 + faker/providers/internet/el_GR/__init__.py | 4 +++- faker/providers/internet/en_AU/__init__.py | 1 + faker/providers/internet/en_NZ/__init__.py | 1 + faker/providers/internet/en_PH/__init__.py | 3 +++ faker/providers/internet/en_US/__init__.py | 1 + faker/providers/internet/fa_IR/__init__.py | 1 + faker/providers/internet/fi_FI/__init__.py | 1 + faker/providers/internet/fr_CH/__init__.py | 1 + faker/providers/internet/fr_FR/__init__.py | 1 + faker/providers/internet/hr_HR/__init__.py | 1 + faker/providers/internet/hu_HU/__init__.py | 1 + faker/providers/internet/id_ID/__init__.py | 1 + faker/providers/internet/it_IT/__init__.py | 1 + faker/providers/internet/ja_JP/__init__.py | 4 +++- faker/providers/internet/ko_KR/__init__.py | 1 + faker/providers/internet/no_NO/__init__.py | 1 + faker/providers/internet/pt_BR/__init__.py | 1 + faker/providers/internet/pt_PT/__init__.py | 1 + faker/providers/internet/ru_RU/__init__.py | 1 + faker/providers/internet/sk_SK/__init__.py | 1 + faker/providers/internet/sl_SI/__init__.py | 1 + faker/providers/internet/sv_SE/__init__.py | 1 + faker/providers/internet/zh_CN/__init__.py | 5 ++++- faker/providers/internet/zh_TW/__init__.py | 4 +++- faker/providers/isbn/__init__.py | 1 + faker/providers/job/ar_AA/__init__.py | 1 + faker/providers/job/bs_BA/__init__.py | 2 ++ faker/providers/job/de_DE/__init__.py | 1 + faker/providers/job/el_GR/__init__.py | 1 + faker/providers/job/fa_IR/__init__.py | 1 + faker/providers/job/fi_FI/__init__.py | 1 + faker/providers/job/fr_CH/__init__.py | 1 + faker/providers/job/fr_FR/__init__.py | 1 + faker/providers/job/hr_HR/__init__.py | 1 + faker/providers/job/hu_HU/__init__.py | 1 + faker/providers/job/hy_AM/__init__.py | 1 + faker/providers/job/ja_JP/__init__.py | 1 + faker/providers/job/ko_KR/__init__.py | 1 + faker/providers/job/pl_PL/__init__.py | 1 + faker/providers/job/pt_BR/__init__.py | 1 + faker/providers/job/pt_PT/__init__.py | 2 +- faker/providers/job/ru_RU/__init__.py | 1 + faker/providers/job/th_TH/__init__.py | 1 + faker/providers/job/uk_UA/__init__.py | 1 + faker/providers/job/zh_CN/__init__.py | 1 + faker/providers/job/zh_TW/__init__.py | 1 + faker/providers/lorem/ar_AA/__init__.py | 1 + faker/providers/lorem/el_GR/__init__.py | 1 + faker/providers/lorem/en_PH/__init__.py | 3 ++- faker/providers/lorem/en_US/__init__.py | 1 + faker/providers/lorem/fil_PH/__init__.py | 1 + faker/providers/lorem/fr_FR/__init__.py | 1 + faker/providers/lorem/he_IL/__init__.py | 1 + faker/providers/lorem/hy_AM/__init__.py | 1 + faker/providers/lorem/la/__init__.py | 1 + faker/providers/lorem/pl_PL/__init__.py | 1 + faker/providers/lorem/ru_RU/__init__.py | 1 + faker/providers/lorem/th_TH/__init__.py | 1 + faker/providers/lorem/zh_CN/__init__.py | 1 + faker/providers/lorem/zh_TW/__init__.py | 1 + faker/providers/misc/__init__.py | 4 ++-- faker/providers/misc/en_PH/__init__.py | 1 + faker/providers/person/__init__.py | 1 - faker/providers/person/ar_AA/__init__.py | 1 + faker/providers/person/ar_PS/__init__.py | 1 + faker/providers/person/ar_SA/__init__.py | 1 + faker/providers/person/bg_BG/__init__.py | 1 + faker/providers/person/cs_CZ/__init__.py | 2 ++ faker/providers/person/de_AT/__init__.py | 1 + faker/providers/person/de_CH/__init__.py | 1 + faker/providers/person/de_DE/__init__.py | 1 + faker/providers/person/dk_DK/__init__.py | 1 + faker/providers/person/el_GR/__init__.py | 1 + faker/providers/person/en/__init__.py | 1 + faker/providers/person/en_GB/__init__.py | 1 + faker/providers/person/en_NZ/__init__.py | 1 + faker/providers/person/en_TH/__init__.py | 1 + faker/providers/person/en_US/__init__.py | 1 + faker/providers/person/es_CA/__init__.py | 1 + faker/providers/person/es_ES/__init__.py | 1 + faker/providers/person/es_MX/__init__.py | 1 + faker/providers/person/fa_IR/__init__.py | 1 + faker/providers/person/fi_FI/__init__.py | 4 +++- faker/providers/person/fr_CH/__init__.py | 1 + faker/providers/person/fr_FR/__init__.py | 1 + faker/providers/person/he_IL/__init__.py | 1 + faker/providers/person/hi_IN/__init__.py | 1 + faker/providers/person/hr_HR/__init__.py | 1 + faker/providers/person/hu_HU/__init__.py | 3 ++- faker/providers/person/hy_AM/__init__.py | 1 + faker/providers/person/id_ID/__init__.py | 1 + faker/providers/person/it_IT/__init__.py | 1 + faker/providers/person/ja_JP/__init__.py | 1 + faker/providers/person/ko_KR/__init__.py | 1 + faker/providers/person/lt_LT/__init__.py | 1 + faker/providers/person/lv_LV/__init__.py | 1 + faker/providers/person/ne_NP/__init__.py | 1 + faker/providers/person/nl_NL/__init__.py | 1 + faker/providers/person/no_NO/__init__.py | 1 + faker/providers/person/pl_PL/__init__.py | 1 + faker/providers/person/pt_BR/__init__.py | 1 + faker/providers/person/pt_PT/__init__.py | 1 + faker/providers/person/ro_RO/__init__.py | 1 + faker/providers/person/ru_RU/__init__.py | 1 + faker/providers/person/sl_SI/__init__.py | 1 + faker/providers/person/sv_SE/__init__.py | 2 ++ faker/providers/person/ta_IN/__init__.py | 1 + faker/providers/person/th_TH/__init__.py | 1 + faker/providers/person/tr_TR/__init__.py | 1 + faker/providers/person/zh_CN/__init__.py | 2 ++ faker/providers/person/zh_TW/__init__.py | 2 ++ .../providers/phone_number/ar_JO/__init__.py | 1 + .../providers/phone_number/ar_PS/__init__.py | 1 + .../providers/phone_number/bg_BG/__init__.py | 1 + .../providers/phone_number/bs_BA/__init__.py | 1 + .../providers/phone_number/cs_CZ/__init__.py | 1 + .../providers/phone_number/de_DE/__init__.py | 1 + .../providers/phone_number/dk_DK/__init__.py | 1 + .../providers/phone_number/el_GR/__init__.py | 1 + .../providers/phone_number/en_AU/__init__.py | 1 + .../providers/phone_number/en_CA/__init__.py | 1 + .../providers/phone_number/en_GB/__init__.py | 1 + .../providers/phone_number/en_NZ/__init__.py | 1 + .../providers/phone_number/en_PH/__init__.py | 1 + .../providers/phone_number/en_US/__init__.py | 1 + .../providers/phone_number/es_ES/__init__.py | 1 + .../providers/phone_number/es_MX/__init__.py | 1 + .../providers/phone_number/fa_IR/__init__.py | 1 + .../providers/phone_number/fi_FI/__init__.py | 1 + .../providers/phone_number/fr_CH/__init__.py | 1 + .../providers/phone_number/fr_FR/__init__.py | 1 + .../providers/phone_number/he_IL/__init__.py | 1 + .../providers/phone_number/hi_IN/__init__.py | 1 + .../providers/phone_number/hr_HR/__init__.py | 1 + .../providers/phone_number/hu_HU/__init__.py | 1 + .../providers/phone_number/hy_AM/__init__.py | 1 + .../providers/phone_number/id_ID/__init__.py | 1 + .../providers/phone_number/it_IT/__init__.py | 1 + .../providers/phone_number/ja_JP/__init__.py | 1 + .../providers/phone_number/ko_KR/__init__.py | 1 + .../providers/phone_number/lt_LT/__init__.py | 1 + .../providers/phone_number/lv_LV/__init__.py | 1 + .../providers/phone_number/ne_NP/__init__.py | 1 + .../providers/phone_number/nl_BE/__init__.py | 1 + .../providers/phone_number/nl_NL/__init__.py | 1 + .../providers/phone_number/no_NO/__init__.py | 1 + .../providers/phone_number/pl_PL/__init__.py | 1 + .../providers/phone_number/pt_BR/__init__.py | 1 + .../providers/phone_number/pt_PT/__init__.py | 1 + .../providers/phone_number/ru_RU/__init__.py | 1 + .../providers/phone_number/sk_SK/__init__.py | 1 + .../providers/phone_number/sl_SI/__init__.py | 1 + .../providers/phone_number/sv_SE/__init__.py | 1 + .../providers/phone_number/ta_IN/__init__.py | 1 + .../providers/phone_number/th_TH/__init__.py | 1 + .../providers/phone_number/tr_TR/__init__.py | 1 + .../providers/phone_number/tw_GH/__init__.py | 1 + .../providers/phone_number/uk_UA/__init__.py | 1 + .../providers/phone_number/zh_CN/__init__.py | 1 + .../providers/phone_number/zh_TW/__init__.py | 1 + faker/providers/profile/__init__.py | 3 ++- faker/providers/python/__init__.py | 3 ++- faker/providers/ssn/en_CA/__init__.py | 1 + faker/providers/ssn/en_GB/__init__.py | 1 + faker/providers/ssn/en_PH/__init__.py | 1 + faker/providers/ssn/es_MX/__init__.py | 1 - faker/providers/ssn/et_EE/__init__.py | 4 +++- faker/providers/ssn/fi_FI/__init__.py | 4 +++- faker/providers/ssn/fr_CH/__init__.py | 1 + faker/providers/ssn/he_IL/__init__.py | 1 + faker/providers/ssn/hr_HR/__init__.py | 1 + faker/providers/ssn/hu_HU/__init__.py | 4 +++- faker/providers/ssn/it_IT/__init__.py | 3 ++- faker/providers/ssn/ko_KR/__init__.py | 1 + faker/providers/ssn/nl_BE/__init__.py | 2 ++ faker/providers/ssn/nl_NL/__init__.py | 1 + faker/providers/ssn/no_NO/__init__.py | 4 +++- faker/providers/ssn/pl_PL/__init__.py | 1 + faker/providers/ssn/ru_RU/__init__.py | 1 + faker/providers/ssn/sv_SE/__init__.py | 4 +++- faker/providers/ssn/tr_TR/__init__.py | 1 + faker/providers/ssn/zh_CN/__init__.py | 4 +++- faker/providers/ssn/zh_TW/__init__.py | 1 + faker/providers/user_agent/__init__.py | 1 + faker/proxy.py | 4 +++- tests/providers/__init__.py | 1 + tests/providers/test_address.py | 10 ++++----- tests/providers/test_automotive.py | 3 ++- tests/providers/test_color.py | 11 ++++++---- tests/providers/test_company.py | 5 ++--- tests/providers/test_date_time.py | 11 ++++++---- tests/providers/test_file.py | 2 +- tests/providers/test_geo.py | 2 ++ tests/providers/test_internet.py | 17 ++++++++------ tests/providers/test_isbn.py | 6 +++-- tests/providers/test_misc.py | 6 +++-- tests/providers/test_person.py | 22 +++++++++---------- tests/providers/test_python.py | 5 +++-- tests/providers/test_ssn.py | 15 ++++++++----- tests/providers/test_user_agent.py | 2 +- tests/test_factory.py | 12 +++++----- tests/test_proxy.py | 12 +++++----- tox.ini | 8 ++++++- 321 files changed, 448 insertions(+), 106 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f3026387cc..3286acf3a4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,5 @@ jobs: - image: circleci/python:latest-node-browsers steps: - checkout - - run: pip install --user virtualenv - - run: virtualenv faker - - run: source faker/bin/activate && pip install tox - - run: source faker/bin/activate && tox + - run: pip install --user tox + - run: tox diff --git a/.travis.yml b/.travis.yml index 7f21e02e7a..6cde8b0986 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ matrix: env: TOXENV=flake8 - python: 3.7 env: TOXENV=checkmanifest + - env: TOXENV=isort - python: 2.7 env: TOXENV=py27 - python: 3.5 diff --git a/faker/__init__.py b/faker/__init__.py index 4501ab7311..d134e93863 100644 --- a/faker/__init__.py +++ b/faker/__init__.py @@ -1,5 +1,5 @@ -from faker.generator import Generator # noqa F401 from faker.factory import Factory # noqa F401 +from faker.generator import Generator # noqa F401 from faker.proxy import Faker # noqa F401 VERSION = '3.0.0' diff --git a/faker/factory.py b/faker/factory.py index 6dd885e7e0..a91ec90b28 100644 --- a/faker/factory.py +++ b/faker/factory.py @@ -8,8 +8,8 @@ from importlib import import_module -from faker import Generator from faker.config import AVAILABLE_LOCALES, DEFAULT_LOCALE, PROVIDERS +from faker.generator import Generator from faker.utils.loading import list_module logger = logging.getLogger(__name__) diff --git a/faker/generator.py b/faker/generator.py index f435ab95fb..9371e195b8 100644 --- a/faker/generator.py +++ b/faker/generator.py @@ -4,6 +4,7 @@ import random as random_module import re + import six _re_token = re.compile(r'\{\{(\s?)(\w+)(\s?)\}\}') diff --git a/faker/providers/address/__init__.py b/faker/providers/address/__init__.py index 539535ca9f..6923e1a1b2 100644 --- a/faker/providers/address/__init__.py +++ b/faker/providers/address/__init__.py @@ -1,8 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import BaseProvider -from .. import date_time +from .. import BaseProvider, date_time localized = True diff --git a/faker/providers/address/cs_CZ/__init__.py b/faker/providers/address/cs_CZ/__init__.py index add6d182a8..e113e26fb9 100644 --- a/faker/providers/address/cs_CZ/__init__.py +++ b/faker/providers/address/cs_CZ/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/de/__init__.py b/faker/providers/address/de/__init__.py index b5ade9eb22..243b6b383f 100644 --- a/faker/providers/address/de/__init__.py +++ b/faker/providers/address/de/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/de_AT/__init__.py b/faker/providers/address/de_AT/__init__.py index 32ae17ab70..0f92220032 100644 --- a/faker/providers/address/de_AT/__init__.py +++ b/faker/providers/address/de_AT/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from ..de import Provider as AddressProvider diff --git a/faker/providers/address/de_DE/__init__.py b/faker/providers/address/de_DE/__init__.py index b638a89ced..719498072f 100644 --- a/faker/providers/address/de_DE/__init__.py +++ b/faker/providers/address/de_DE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from ..de import Provider as AddressProvider diff --git a/faker/providers/address/en/__init__.py b/faker/providers/address/en/__init__.py index 5992c696cd..516e6309a2 100644 --- a/faker/providers/address/en/__init__.py +++ b/faker/providers/address/en/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/en_CA/__init__.py b/faker/providers/address/en_CA/__init__.py index f558103c2f..f72896cff2 100644 --- a/faker/providers/address/en_CA/__init__.py +++ b/faker/providers/address/en_CA/__init__.py @@ -1,5 +1,7 @@ from __future__ import unicode_literals + import re + from ..en import Provider as AddressProvider diff --git a/faker/providers/address/en_GB/__init__.py b/faker/providers/address/en_GB/__init__.py index 262968b031..c620683129 100644 --- a/faker/providers/address/en_GB/__init__.py +++ b/faker/providers/address/en_GB/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from collections import OrderedDict from ..en import Provider as AddressProvider diff --git a/faker/providers/address/en_NZ/__init__.py b/faker/providers/address/en_NZ/__init__.py index e84131acbf..15cdda44b3 100644 --- a/faker/providers/address/en_NZ/__init__.py +++ b/faker/providers/address/en_NZ/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from ..en import Provider as AddressProvider diff --git a/faker/providers/address/en_PH/__init__.py b/faker/providers/address/en_PH/__init__.py index 4e5062d724..9eeeab2f0b 100644 --- a/faker/providers/address/en_PH/__init__.py +++ b/faker/providers/address/en_PH/__init__.py @@ -1,7 +1,9 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from string import ascii_uppercase + from .. import Provider as AddressProvider diff --git a/faker/providers/address/en_US/__init__.py b/faker/providers/address/en_US/__init__.py index f294093c61..b632394a01 100644 --- a/faker/providers/address/en_US/__init__.py +++ b/faker/providers/address/en_US/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from collections import OrderedDict from ..en import Provider as AddressProvider diff --git a/faker/providers/address/es/__init__.py b/faker/providers/address/es/__init__.py index 2714e08515..bbd0b0deb5 100644 --- a/faker/providers/address/es/__init__.py +++ b/faker/providers/address/es/__init__.py @@ -1,5 +1,6 @@ # -*- encoding: utf-8 -*- from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/es_ES/__init__.py b/faker/providers/address/es_ES/__init__.py index c60f1b2332..b8677e02de 100644 --- a/faker/providers/address/es_ES/__init__.py +++ b/faker/providers/address/es_ES/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from ..es import Provider as AddressProvider diff --git a/faker/providers/address/es_MX/__init__.py b/faker/providers/address/es_MX/__init__.py index b04685770b..0893244105 100644 --- a/faker/providers/address/es_MX/__init__.py +++ b/faker/providers/address/es_MX/__init__.py @@ -1,5 +1,6 @@ # -*- encoding: utf-8 -*- from __future__ import unicode_literals + from collections import OrderedDict from ..es import Provider as AddressProvider diff --git a/faker/providers/address/fa_IR/__init__.py b/faker/providers/address/fa_IR/__init__.py index 00205fbee4..877a314afa 100644 --- a/faker/providers/address/fa_IR/__init__.py +++ b/faker/providers/address/fa_IR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/fi_FI/__init__.py b/faker/providers/address/fi_FI/__init__.py index 694ac46936..40f91c437d 100644 --- a/faker/providers/address/fi_FI/__init__.py +++ b/faker/providers/address/fi_FI/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/fr_CH/__init__.py b/faker/providers/address/fr_CH/__init__.py index 8216d979f7..4e28be7eef 100644 --- a/faker/providers/address/fr_CH/__init__.py +++ b/faker/providers/address/fr_CH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/fr_FR/__init__.py b/faker/providers/address/fr_FR/__init__.py index 1b5331bc8a..eae347f0ec 100644 --- a/faker/providers/address/fr_FR/__init__.py +++ b/faker/providers/address/fr_FR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/hi_IN/__init__.py b/faker/providers/address/hi_IN/__init__.py index e75541649d..7cdb32d07b 100644 --- a/faker/providers/address/hi_IN/__init__.py +++ b/faker/providers/address/hi_IN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/hr_HR/__init__.py b/faker/providers/address/hr_HR/__init__.py index 9f649aebf5..c55b959569 100755 --- a/faker/providers/address/hr_HR/__init__.py +++ b/faker/providers/address/hr_HR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/hu_HU/__init__.py b/faker/providers/address/hu_HU/__init__.py index b358264a70..e3a84c1307 100644 --- a/faker/providers/address/hu_HU/__init__.py +++ b/faker/providers/address/hu_HU/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as AddressProvider diff --git a/faker/providers/address/hy_AM/__init__.py b/faker/providers/address/hy_AM/__init__.py index 06b62375e4..3ff12a4616 100644 --- a/faker/providers/address/hy_AM/__init__.py +++ b/faker/providers/address/hy_AM/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/id_ID/__init__.py b/faker/providers/address/id_ID/__init__.py index 1764e77cc2..0d32696b4c 100644 --- a/faker/providers/address/id_ID/__init__.py +++ b/faker/providers/address/id_ID/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/it_IT/__init__.py b/faker/providers/address/it_IT/__init__.py index 2705918333..c3a12162e2 100644 --- a/faker/providers/address/it_IT/__init__.py +++ b/faker/providers/address/it_IT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/ko_KR/__init__.py b/faker/providers/address/ko_KR/__init__.py index 18d8e811a0..b1d3c4ce63 100644 --- a/faker/providers/address/ko_KR/__init__.py +++ b/faker/providers/address/ko_KR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/nl_BE/__init__.py b/faker/providers/address/nl_BE/__init__.py index 22529f7b47..3cad0ad63e 100644 --- a/faker/providers/address/nl_BE/__init__.py +++ b/faker/providers/address/nl_BE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/nl_NL/__init__.py b/faker/providers/address/nl_NL/__init__.py index d3d820b105..78f7da31de 100644 --- a/faker/providers/address/nl_NL/__init__.py +++ b/faker/providers/address/nl_NL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/pl_PL/__init__.py b/faker/providers/address/pl_PL/__init__.py index a63c3cbe3f..fc524c71dd 100644 --- a/faker/providers/address/pl_PL/__init__.py +++ b/faker/providers/address/pl_PL/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/pt_BR/__init__.py b/faker/providers/address/pt_BR/__init__.py index 8dd5d0196f..e179aa82c3 100644 --- a/faker/providers/address/pt_BR/__init__.py +++ b/faker/providers/address/pt_BR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/pt_PT/__init__.py b/faker/providers/address/pt_PT/__init__.py index f42a0720b0..0ba11a8ef5 100644 --- a/faker/providers/address/pt_PT/__init__.py +++ b/faker/providers/address/pt_PT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/ru_RU/__init__.py b/faker/providers/address/ru_RU/__init__.py index 5eb6463c54..7bcf6b68bd 100644 --- a/faker/providers/address/ru_RU/__init__.py +++ b/faker/providers/address/ru_RU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/sk_SK/__init__.py b/faker/providers/address/sk_SK/__init__.py index fce27fe796..6b8e487514 100644 --- a/faker/providers/address/sk_SK/__init__.py +++ b/faker/providers/address/sk_SK/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/sl_SI/__init__.py b/faker/providers/address/sl_SI/__init__.py index 4c033b4235..41f8bd1bc6 100755 --- a/faker/providers/address/sl_SI/__init__.py +++ b/faker/providers/address/sl_SI/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/sv_SE/__init__.py b/faker/providers/address/sv_SE/__init__.py index 75bc463733..83db3d86d9 100644 --- a/faker/providers/address/sv_SE/__init__.py +++ b/faker/providers/address/sv_SE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/ta_IN/__init__.py b/faker/providers/address/ta_IN/__init__.py index cd7356bafb..3e7f79c053 100644 --- a/faker/providers/address/ta_IN/__init__.py +++ b/faker/providers/address/ta_IN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/zh_CN/__init__.py b/faker/providers/address/zh_CN/__init__.py index 3a091485d6..41262d070a 100644 --- a/faker/providers/address/zh_CN/__init__.py +++ b/faker/providers/address/zh_CN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/address/zh_TW/__init__.py b/faker/providers/address/zh_TW/__init__.py index d094b533cd..3c03ec7646 100644 --- a/faker/providers/address/zh_TW/__init__.py +++ b/faker/providers/address/zh_TW/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AddressProvider diff --git a/faker/providers/automotive/__init__.py b/faker/providers/automotive/__init__.py index bcdfc24f9e..1edffe0377 100644 --- a/faker/providers/automotive/__init__.py +++ b/faker/providers/automotive/__init__.py @@ -1,9 +1,11 @@ # coding=utf-8 -from .. import BaseProvider -from string import ascii_uppercase import re +from string import ascii_uppercase + +from .. import BaseProvider + localized = True diff --git a/faker/providers/automotive/ar_JO/__init__.py b/faker/providers/automotive/ar_JO/__init__.py index 78fd138405..2fb0bd6e27 100644 --- a/faker/providers/automotive/ar_JO/__init__.py +++ b/faker/providers/automotive/ar_JO/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/ar_PS/__init__.py b/faker/providers/automotive/ar_PS/__init__.py index 5d0c0b859e..81c160c8a9 100644 --- a/faker/providers/automotive/ar_PS/__init__.py +++ b/faker/providers/automotive/ar_PS/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/de_DE/__init__.py b/faker/providers/automotive/de_DE/__init__.py index 14bc54d32c..be54eb4489 100644 --- a/faker/providers/automotive/de_DE/__init__.py +++ b/faker/providers/automotive/de_DE/__init__.py @@ -2,9 +2,11 @@ from __future__ import unicode_literals -from .. import Provider as AutomotiveProvider + import string +from .. import Provider as AutomotiveProvider + class Provider(AutomotiveProvider): diff --git a/faker/providers/automotive/en_CA/__init__.py b/faker/providers/automotive/en_CA/__init__.py index 82a1679844..d620460dff 100644 --- a/faker/providers/automotive/en_CA/__init__.py +++ b/faker/providers/automotive/en_CA/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/en_GB/__init__.py b/faker/providers/automotive/en_GB/__init__.py index ccd5bf708b..1cb6001422 100644 --- a/faker/providers/automotive/en_GB/__init__.py +++ b/faker/providers/automotive/en_GB/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/en_NZ/__init__.py b/faker/providers/automotive/en_NZ/__init__.py index 84e3ca0af2..a2adf1fd17 100644 --- a/faker/providers/automotive/en_NZ/__init__.py +++ b/faker/providers/automotive/en_NZ/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/en_PH/__init__.py b/faker/providers/automotive/en_PH/__init__.py index c8df1680b5..82d3c4d447 100644 --- a/faker/providers/automotive/en_PH/__init__.py +++ b/faker/providers/automotive/en_PH/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals + from string import ascii_uppercase + from ... import BaseProvider diff --git a/faker/providers/automotive/en_US/__init__.py b/faker/providers/automotive/en_US/__init__.py index 562bf6c98f..e965f94dc3 100644 --- a/faker/providers/automotive/en_US/__init__.py +++ b/faker/providers/automotive/en_US/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/hu_HU/__init__.py b/faker/providers/automotive/hu_HU/__init__.py index 329844e408..6d720925f8 100644 --- a/faker/providers/automotive/hu_HU/__init__.py +++ b/faker/providers/automotive/hu_HU/__init__.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/id_ID/__init__.py b/faker/providers/automotive/id_ID/__init__.py index da3865748b..3bd137fb07 100644 --- a/faker/providers/automotive/id_ID/__init__.py +++ b/faker/providers/automotive/id_ID/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/pl_PL/__init__.py b/faker/providers/automotive/pl_PL/__init__.py index 965a996b9f..30bc86774e 100644 --- a/faker/providers/automotive/pl_PL/__init__.py +++ b/faker/providers/automotive/pl_PL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/ru_RU/__init__.py b/faker/providers/automotive/ru_RU/__init__.py index e3b4e5cf9d..343ff26f5d 100644 --- a/faker/providers/automotive/ru_RU/__init__.py +++ b/faker/providers/automotive/ru_RU/__init__.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/automotive/sv_SE/__init__.py b/faker/providers/automotive/sv_SE/__init__.py index 1cb540ae80..a279987eae 100644 --- a/faker/providers/automotive/sv_SE/__init__.py +++ b/faker/providers/automotive/sv_SE/__init__.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals + from .. import Provider as AutomotiveProvider diff --git a/faker/providers/bank/__init__.py b/faker/providers/bank/__init__.py index b8f1e0fc7f..a7f554b0a8 100644 --- a/faker/providers/bank/__init__.py +++ b/faker/providers/bank/__init__.py @@ -1,8 +1,10 @@ # coding=utf-8 -from .. import BaseProvider +import re import string + from string import ascii_uppercase -import re + +from .. import BaseProvider localized = True default_locale = 'en_GB' diff --git a/faker/providers/barcode/__init__.py b/faker/providers/barcode/__init__.py index 512a576a9c..779fba8cc1 100644 --- a/faker/providers/barcode/__init__.py +++ b/faker/providers/barcode/__init__.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import re + from six import string_types from .. import BaseProvider diff --git a/faker/providers/color/__init__.py b/faker/providers/color/__init__.py index 143855edc1..2b592e5f77 100644 --- a/faker/providers/color/__init__.py +++ b/faker/providers/color/__init__.py @@ -1,9 +1,10 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict -from .color import RandomColor from .. import BaseProvider +from .color import RandomColor localized = True diff --git a/faker/providers/color/ar_PS/__init__.py b/faker/providers/color/ar_PS/__init__.py index 52f0b7207a..d8f8073dfa 100644 --- a/faker/providers/color/ar_PS/__init__.py +++ b/faker/providers/color/ar_PS/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as ColorProvider diff --git a/faker/providers/color/color.py b/faker/providers/color/color.py index c354de7956..797e86970a 100644 --- a/faker/providers/color/color.py +++ b/faker/providers/color/color.py @@ -14,7 +14,6 @@ import six - COLOR_MAP = { 'monochrome': { 'hue_range': [0, 0], diff --git a/faker/providers/color/fr_FR/__init__.py b/faker/providers/color/fr_FR/__init__.py index 7826ecaba6..0c5b24efde 100644 --- a/faker/providers/color/fr_FR/__init__.py +++ b/faker/providers/color/fr_FR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as ColorProvider diff --git a/faker/providers/color/hy_AM/__init__.py b/faker/providers/color/hy_AM/__init__.py index 2e1949a961..012dd88351 100644 --- a/faker/providers/color/hy_AM/__init__.py +++ b/faker/providers/color/hy_AM/__init__.py @@ -1,7 +1,9 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from .. import Provider as ColorProvider diff --git a/faker/providers/color/pt_BR/__init__.py b/faker/providers/color/pt_BR/__init__.py index e0368b2b56..abae7a955c 100644 --- a/faker/providers/color/pt_BR/__init__.py +++ b/faker/providers/color/pt_BR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as ColorProvider diff --git a/faker/providers/color/ru_RU/__init__.py b/faker/providers/color/ru_RU/__init__.py index 307bbe3388..a3f5845f96 100644 --- a/faker/providers/color/ru_RU/__init__.py +++ b/faker/providers/color/ru_RU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as ColorProvider diff --git a/faker/providers/color/th_TH/__init__.py b/faker/providers/color/th_TH/__init__.py index 366859f00d..d53b7006af 100644 --- a/faker/providers/color/th_TH/__init__.py +++ b/faker/providers/color/th_TH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as ColorProvider diff --git a/faker/providers/company/__init__.py b/faker/providers/company/__init__.py index 2bf22c404d..cdf1f10293 100644 --- a/faker/providers/company/__init__.py +++ b/faker/providers/company/__init__.py @@ -1,8 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import BaseProvider +from .. import BaseProvider localized = True diff --git a/faker/providers/company/bg_BG/__init__.py b/faker/providers/company/bg_BG/__init__.py index 6ea9f10581..345aed5b97 100644 --- a/faker/providers/company/bg_BG/__init__.py +++ b/faker/providers/company/bg_BG/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/cs_CZ/__init__.py b/faker/providers/company/cs_CZ/__init__.py index 0a887de3b9..ac465bd755 100644 --- a/faker/providers/company/cs_CZ/__init__.py +++ b/faker/providers/company/cs_CZ/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/de_DE/__init__.py b/faker/providers/company/de_DE/__init__.py index af04cd9912..6ab53f3484 100644 --- a/faker/providers/company/de_DE/__init__.py +++ b/faker/providers/company/de_DE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/en_PH/__init__.py b/faker/providers/company/en_PH/__init__.py index 3d27a319d1..63370fe9f4 100644 --- a/faker/providers/company/en_PH/__init__.py +++ b/faker/providers/company/en_PH/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/en_US/__init__.py b/faker/providers/company/en_US/__init__.py index de6df667ce..04bac79f23 100644 --- a/faker/providers/company/en_US/__init__.py +++ b/faker/providers/company/en_US/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/es_MX/__init__.py b/faker/providers/company/es_MX/__init__.py index f5a8d2f969..0207351f0b 100644 --- a/faker/providers/company/es_MX/__init__.py +++ b/faker/providers/company/es_MX/__init__.py @@ -1,5 +1,6 @@ # -*- encoding: utf-8 -*- from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/fa_IR/__init__.py b/faker/providers/company/fa_IR/__init__.py index cb55d53961..a186c5eaed 100644 --- a/faker/providers/company/fa_IR/__init__.py +++ b/faker/providers/company/fa_IR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/fi_FI/__init__.py b/faker/providers/company/fi_FI/__init__.py index fb779110d1..4656d147a1 100644 --- a/faker/providers/company/fi_FI/__init__.py +++ b/faker/providers/company/fi_FI/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/fil_PH/__init__.py b/faker/providers/company/fil_PH/__init__.py index 2652144a7b..9a0cd6df48 100644 --- a/faker/providers/company/fil_PH/__init__.py +++ b/faker/providers/company/fil_PH/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from ..en_PH import Provider as EnPhProvider diff --git a/faker/providers/company/fr_CH/__init__.py b/faker/providers/company/fr_CH/__init__.py index a4a66c164e..b0685a85b3 100644 --- a/faker/providers/company/fr_CH/__init__.py +++ b/faker/providers/company/fr_CH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from ..fr_FR import Provider as CompanyProvider diff --git a/faker/providers/company/fr_FR/__init__.py b/faker/providers/company/fr_FR/__init__.py index 9d4adce830..f6c1f6e180 100644 --- a/faker/providers/company/fr_FR/__init__.py +++ b/faker/providers/company/fr_FR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/hr_HR/__init__.py b/faker/providers/company/hr_HR/__init__.py index 46ef2493f4..9927260e02 100755 --- a/faker/providers/company/hr_HR/__init__.py +++ b/faker/providers/company/hr_HR/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/hu_HU/__init__.py b/faker/providers/company/hu_HU/__init__.py index aadfa28878..eed6147a40 100644 --- a/faker/providers/company/hu_HU/__init__.py +++ b/faker/providers/company/hu_HU/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/hy_AM/__init__.py b/faker/providers/company/hy_AM/__init__.py index 71b22aa449..8ac8c55e66 100644 --- a/faker/providers/company/hy_AM/__init__.py +++ b/faker/providers/company/hy_AM/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/id_ID/__init__.py b/faker/providers/company/id_ID/__init__.py index 9b5d8b3eb3..189fc238d4 100644 --- a/faker/providers/company/id_ID/__init__.py +++ b/faker/providers/company/id_ID/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/it_IT/__init__.py b/faker/providers/company/it_IT/__init__.py index 51ce63d907..a98294d3b0 100644 --- a/faker/providers/company/it_IT/__init__.py +++ b/faker/providers/company/it_IT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/ja_JP/__init__.py b/faker/providers/company/ja_JP/__init__.py index f50177fc1c..09bddedf5f 100644 --- a/faker/providers/company/ja_JP/__init__.py +++ b/faker/providers/company/ja_JP/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/ko_KR/__init__.py b/faker/providers/company/ko_KR/__init__.py index 7a279ba5da..226b643fbf 100644 --- a/faker/providers/company/ko_KR/__init__.py +++ b/faker/providers/company/ko_KR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/nl_NL/__init__.py b/faker/providers/company/nl_NL/__init__.py index f19d3726ec..dfe5a865e5 100644 --- a/faker/providers/company/nl_NL/__init__.py +++ b/faker/providers/company/nl_NL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/no_NO/__init__.py b/faker/providers/company/no_NO/__init__.py index 29e760e7db..15ba36b4dc 100644 --- a/faker/providers/company/no_NO/__init__.py +++ b/faker/providers/company/no_NO/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/pl_PL/__init__.py b/faker/providers/company/pl_PL/__init__.py index 0f14dbd7f5..07bb3a329e 100644 --- a/faker/providers/company/pl_PL/__init__.py +++ b/faker/providers/company/pl_PL/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/pt_BR/__init__.py b/faker/providers/company/pt_BR/__init__.py index b03418ff48..d8e8e34bc9 100644 --- a/faker/providers/company/pt_BR/__init__.py +++ b/faker/providers/company/pt_BR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/pt_PT/__init__.py b/faker/providers/company/pt_PT/__init__.py index 93b905db3f..1dd0c8eea0 100644 --- a/faker/providers/company/pt_PT/__init__.py +++ b/faker/providers/company/pt_PT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/ru_RU/__init__.py b/faker/providers/company/ru_RU/__init__.py index 36bfc77898..6e4445b27f 100644 --- a/faker/providers/company/ru_RU/__init__.py +++ b/faker/providers/company/ru_RU/__init__.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals from faker.utils.datetime_safe import datetime + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/sk_SK/__init__.py b/faker/providers/company/sk_SK/__init__.py index 9ae3505169..e63f1075cf 100644 --- a/faker/providers/company/sk_SK/__init__.py +++ b/faker/providers/company/sk_SK/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/sl_SI/__init__.py b/faker/providers/company/sl_SI/__init__.py index 63aa8dfde0..9afe7102e2 100755 --- a/faker/providers/company/sl_SI/__init__.py +++ b/faker/providers/company/sl_SI/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/sv_SE/__init__.py b/faker/providers/company/sv_SE/__init__.py index 513dace642..6c07948483 100644 --- a/faker/providers/company/sv_SE/__init__.py +++ b/faker/providers/company/sv_SE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/zh_CN/__init__.py b/faker/providers/company/zh_CN/__init__.py index 331a46b9ea..3e3bcaca6e 100644 --- a/faker/providers/company/zh_CN/__init__.py +++ b/faker/providers/company/zh_CN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/company/zh_TW/__init__.py b/faker/providers/company/zh_TW/__init__.py index 6a27e2d8f8..8b6d6a5fde 100644 --- a/faker/providers/company/zh_TW/__init__.py +++ b/faker/providers/company/zh_TW/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as CompanyProvider diff --git a/faker/providers/credit_card/__init__.py b/faker/providers/credit_card/__init__.py index 94595fe466..f4a90eda7f 100644 --- a/faker/providers/credit_card/__init__.py +++ b/faker/providers/credit_card/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import BaseProvider diff --git a/faker/providers/credit_card/fa_IR/__init__.py b/faker/providers/credit_card/fa_IR/__init__.py index 85721a7c55..2be38dd3d8 100644 --- a/faker/providers/credit_card/fa_IR/__init__.py +++ b/faker/providers/credit_card/fa_IR/__init__.py @@ -1,9 +1,10 @@ # coding=utf-8 -from .. import Provider as CreditCardProvider -from .. import CreditCard from collections import OrderedDict +from .. import CreditCard +from .. import Provider as CreditCardProvider + class Provider(CreditCardProvider): diff --git a/faker/providers/date_time/__init__.py b/faker/providers/date_time/__init__.py index 78f91f325e..6b36346973 100644 --- a/faker/providers/date_time/__init__.py +++ b/faker/providers/date_time/__init__.py @@ -5,7 +5,7 @@ import re from calendar import timegm -from datetime import timedelta, MAXYEAR +from datetime import MAXYEAR, timedelta from dateutil import relativedelta from dateutil.tz import tzlocal, tzutc diff --git a/faker/providers/date_time/ar_AA/__init__.py b/faker/providers/date_time/ar_AA/__init__.py index 40a697847c..d51dcb2786 100644 --- a/faker/providers/date_time/ar_AA/__init__.py +++ b/faker/providers/date_time/ar_AA/__init__.py @@ -1,7 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals - from .. import Provider as DateTimeProvider diff --git a/faker/providers/date_time/ar_EG/__init__.py b/faker/providers/date_time/ar_EG/__init__.py index e85d065001..621dd07161 100644 --- a/faker/providers/date_time/ar_EG/__init__.py +++ b/faker/providers/date_time/ar_EG/__init__.py @@ -1,7 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals - from ..ar_AA import Provider as ArabicDateTimeProvider diff --git a/faker/providers/date_time/en_PH/__init__.py b/faker/providers/date_time/en_PH/__init__.py index 7d965c1bbe..cc89f56edc 100644 --- a/faker/providers/date_time/en_PH/__init__.py +++ b/faker/providers/date_time/en_PH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as DateTimeProvider diff --git a/faker/providers/date_time/fil_PH/__init__.py b/faker/providers/date_time/fil_PH/__init__.py index a07ad5ed80..0ddb211485 100644 --- a/faker/providers/date_time/fil_PH/__init__.py +++ b/faker/providers/date_time/fil_PH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as DateTimeProvider diff --git a/faker/providers/date_time/hi_IN/__init__.py b/faker/providers/date_time/hi_IN/__init__.py index 9fd9250d8f..90d5f14a6d 100644 --- a/faker/providers/date_time/hi_IN/__init__.py +++ b/faker/providers/date_time/hi_IN/__init__.py @@ -1,6 +1,7 @@ # coding: utf-8 from __future__ import unicode_literals + from .. import Provider as DateTimeProvider diff --git a/faker/providers/date_time/hu_HU/__init__.py b/faker/providers/date_time/hu_HU/__init__.py index 3ca1d2687b..4a82e4dc19 100644 --- a/faker/providers/date_time/hu_HU/__init__.py +++ b/faker/providers/date_time/hu_HU/__init__.py @@ -1,6 +1,7 @@ # coding: utf-8 from __future__ import unicode_literals + from .. import Provider as DateTimeProvider diff --git a/faker/providers/date_time/hy_AM/__init__.py b/faker/providers/date_time/hy_AM/__init__.py index 488d37cde8..c8883fdd4e 100644 --- a/faker/providers/date_time/hy_AM/__init__.py +++ b/faker/providers/date_time/hy_AM/__init__.py @@ -1,6 +1,7 @@ # coding: utf-8 from __future__ import unicode_literals + from .. import Provider as DateTimeProvider diff --git a/faker/providers/date_time/id_ID/__init__.py b/faker/providers/date_time/id_ID/__init__.py index 5904d2d78f..6c7c390770 100644 --- a/faker/providers/date_time/id_ID/__init__.py +++ b/faker/providers/date_time/id_ID/__init__.py @@ -1,6 +1,7 @@ # coding: utf-8 from __future__ import unicode_literals + from .. import Provider as DateTimeProvider diff --git a/faker/providers/date_time/ta_IN/__init__.py b/faker/providers/date_time/ta_IN/__init__.py index 427534d5ef..23e9e69c1b 100644 --- a/faker/providers/date_time/ta_IN/__init__.py +++ b/faker/providers/date_time/ta_IN/__init__.py @@ -1,6 +1,7 @@ # coding: utf-8 from __future__ import unicode_literals + from .. import Provider as DateTimeProvider diff --git a/faker/providers/file/__init__.py b/faker/providers/file/__init__.py index d08887c619..d73200da27 100644 --- a/faker/providers/file/__init__.py +++ b/faker/providers/file/__init__.py @@ -2,6 +2,7 @@ from __future__ import unicode_literals import string + from collections import OrderedDict from .. import BaseProvider diff --git a/faker/providers/geo/de_AT/__init__.py b/faker/providers/geo/de_AT/__init__.py index 6ad0494af6..58e77554c7 100644 --- a/faker/providers/geo/de_AT/__init__.py +++ b/faker/providers/geo/de_AT/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as GeoProvider diff --git a/faker/providers/geo/pt_PT/__init__.py b/faker/providers/geo/pt_PT/__init__.py index 7415c5cbfe..42a083fea3 100644 --- a/faker/providers/geo/pt_PT/__init__.py +++ b/faker/providers/geo/pt_PT/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as GeoProvider diff --git a/faker/providers/internet/__init__.py b/faker/providers/internet/__init__.py index 8db9d697de..1628e9bbfc 100644 --- a/faker/providers/internet/__init__.py +++ b/faker/providers/internet/__init__.py @@ -1,17 +1,16 @@ # coding=utf-8 from __future__ import unicode_literals -from text_unidecode import unidecode - -from .. import BaseProvider +from ipaddress import IPV4LENGTH, IPV6LENGTH, ip_address, ip_network -from ipaddress import ip_address, ip_network, IPV4LENGTH, IPV6LENGTH +from text_unidecode import unidecode # from faker.generator import random # from faker.providers.lorem.la import Provider as Lorem from faker.utils.decorators import lowercase, slugify, slugify_unicode from faker.utils.distribution import choices_distribution +from .. import BaseProvider localized = True diff --git a/faker/providers/internet/ar_AA/__init__.py b/faker/providers/internet/ar_AA/__init__.py index 74d7a9c917..91bb252aab 100644 --- a/faker/providers/internet/ar_AA/__init__.py +++ b/faker/providers/internet/ar_AA/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/bg_BG/__init__.py b/faker/providers/internet/bg_BG/__init__.py index 06b72320f8..a58c76cfbf 100644 --- a/faker/providers/internet/bg_BG/__init__.py +++ b/faker/providers/internet/bg_BG/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/bs_BA/__init__.py b/faker/providers/internet/bs_BA/__init__.py index 6708b84e76..4973469b30 100644 --- a/faker/providers/internet/bs_BA/__init__.py +++ b/faker/providers/internet/bs_BA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/cs_CZ/__init__.py b/faker/providers/internet/cs_CZ/__init__.py index c6f18ba326..a11b4a97f2 100644 --- a/faker/providers/internet/cs_CZ/__init__.py +++ b/faker/providers/internet/cs_CZ/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/de_AT/__init__.py b/faker/providers/internet/de_AT/__init__.py index e62ce47b0c..f28033463f 100644 --- a/faker/providers/internet/de_AT/__init__.py +++ b/faker/providers/internet/de_AT/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/de_DE/__init__.py b/faker/providers/internet/de_DE/__init__.py index 641ea3f6de..531cb28dec 100644 --- a/faker/providers/internet/de_DE/__init__.py +++ b/faker/providers/internet/de_DE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/el_GR/__init__.py b/faker/providers/internet/el_GR/__init__.py index a6744010ed..e445122897 100644 --- a/faker/providers/internet/el_GR/__init__.py +++ b/faker/providers/internet/el_GR/__init__.py @@ -1,10 +1,12 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as InternetProvider import re + from faker.utils.decorators import slugify_domain +from .. import Provider as InternetProvider + class Provider(InternetProvider): diff --git a/faker/providers/internet/en_AU/__init__.py b/faker/providers/internet/en_AU/__init__.py index 1af0864b39..1b2ddec093 100644 --- a/faker/providers/internet/en_AU/__init__.py +++ b/faker/providers/internet/en_AU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/en_NZ/__init__.py b/faker/providers/internet/en_NZ/__init__.py index 0a394e2689..934ffa64dd 100644 --- a/faker/providers/internet/en_NZ/__init__.py +++ b/faker/providers/internet/en_NZ/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/en_PH/__init__.py b/faker/providers/internet/en_PH/__init__.py index 83c8f937a7..627b860a32 100644 --- a/faker/providers/internet/en_PH/__init__.py +++ b/faker/providers/internet/en_PH/__init__.py @@ -1,7 +1,10 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from faker.utils.decorators import lowercase, slugify + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/en_US/__init__.py b/faker/providers/internet/en_US/__init__.py index 06d493826f..9f367464d5 100644 --- a/faker/providers/internet/en_US/__init__.py +++ b/faker/providers/internet/en_US/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/fa_IR/__init__.py b/faker/providers/internet/fa_IR/__init__.py index bced7908b6..ae40a0a1d7 100644 --- a/faker/providers/internet/fa_IR/__init__.py +++ b/faker/providers/internet/fa_IR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/internet/fi_FI/__init__.py b/faker/providers/internet/fi_FI/__init__.py index d8642443b4..7d87aad4c6 100644 --- a/faker/providers/internet/fi_FI/__init__.py +++ b/faker/providers/internet/fi_FI/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/fr_CH/__init__.py b/faker/providers/internet/fr_CH/__init__.py index bf0b9c8c49..15ce94b641 100644 --- a/faker/providers/internet/fr_CH/__init__.py +++ b/faker/providers/internet/fr_CH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/fr_FR/__init__.py b/faker/providers/internet/fr_FR/__init__.py index 43c0ffab68..f7e25c2736 100644 --- a/faker/providers/internet/fr_FR/__init__.py +++ b/faker/providers/internet/fr_FR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/hr_HR/__init__.py b/faker/providers/internet/hr_HR/__init__.py index 128883cf33..e9c171074e 100755 --- a/faker/providers/internet/hr_HR/__init__.py +++ b/faker/providers/internet/hr_HR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/hu_HU/__init__.py b/faker/providers/internet/hu_HU/__init__.py index 3525b8a0db..0275f3d916 100644 --- a/faker/providers/internet/hu_HU/__init__.py +++ b/faker/providers/internet/hu_HU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/id_ID/__init__.py b/faker/providers/internet/id_ID/__init__.py index 1690492078..6e25df4ca4 100644 --- a/faker/providers/internet/id_ID/__init__.py +++ b/faker/providers/internet/id_ID/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/it_IT/__init__.py b/faker/providers/internet/it_IT/__init__.py index 4f31d2d447..5beb08fd07 100644 --- a/faker/providers/internet/it_IT/__init__.py +++ b/faker/providers/internet/it_IT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/ja_JP/__init__.py b/faker/providers/internet/ja_JP/__init__.py index 0229a10aed..321f67e0a6 100644 --- a/faker/providers/internet/ja_JP/__init__.py +++ b/faker/providers/internet/ja_JP/__init__.py @@ -1,8 +1,10 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as InternetProvider + from faker.utils.decorators import slugify +from .. import Provider as InternetProvider + class Provider(InternetProvider): user_name_formats = ( diff --git a/faker/providers/internet/ko_KR/__init__.py b/faker/providers/internet/ko_KR/__init__.py index 967247cb7d..85228d7137 100644 --- a/faker/providers/internet/ko_KR/__init__.py +++ b/faker/providers/internet/ko_KR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/no_NO/__init__.py b/faker/providers/internet/no_NO/__init__.py index 8ec1fc51c2..6deb0768d5 100644 --- a/faker/providers/internet/no_NO/__init__.py +++ b/faker/providers/internet/no_NO/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/pt_BR/__init__.py b/faker/providers/internet/pt_BR/__init__.py index 36d0e42400..1ddc64bee4 100644 --- a/faker/providers/internet/pt_BR/__init__.py +++ b/faker/providers/internet/pt_BR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/pt_PT/__init__.py b/faker/providers/internet/pt_PT/__init__.py index d1e9f27550..7f54c6146f 100644 --- a/faker/providers/internet/pt_PT/__init__.py +++ b/faker/providers/internet/pt_PT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/ru_RU/__init__.py b/faker/providers/internet/ru_RU/__init__.py index 539d77c659..eac2f3f309 100644 --- a/faker/providers/internet/ru_RU/__init__.py +++ b/faker/providers/internet/ru_RU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/sk_SK/__init__.py b/faker/providers/internet/sk_SK/__init__.py index 3ed7c971b2..65dae685c2 100644 --- a/faker/providers/internet/sk_SK/__init__.py +++ b/faker/providers/internet/sk_SK/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/sl_SI/__init__.py b/faker/providers/internet/sl_SI/__init__.py index c0576757e4..71a1b25f09 100755 --- a/faker/providers/internet/sl_SI/__init__.py +++ b/faker/providers/internet/sl_SI/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/sv_SE/__init__.py b/faker/providers/internet/sv_SE/__init__.py index 11bd46d378..7f398151b3 100644 --- a/faker/providers/internet/sv_SE/__init__.py +++ b/faker/providers/internet/sv_SE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as InternetProvider diff --git a/faker/providers/internet/zh_CN/__init__.py b/faker/providers/internet/zh_CN/__init__.py index e17c86e6f5..53d15a0674 100644 --- a/faker/providers/internet/zh_CN/__init__.py +++ b/faker/providers/internet/zh_CN/__init__.py @@ -1,9 +1,12 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict -from .. import Provider as InternetProvider + from faker.utils.decorators import slugify +from .. import Provider as InternetProvider + class Provider(InternetProvider): user_name_formats = ( diff --git a/faker/providers/internet/zh_TW/__init__.py b/faker/providers/internet/zh_TW/__init__.py index 6eae6bb7cb..615bf81cd0 100644 --- a/faker/providers/internet/zh_TW/__init__.py +++ b/faker/providers/internet/zh_TW/__init__.py @@ -1,8 +1,10 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as InternetProvider + from faker.utils.decorators import slugify +from .. import Provider as InternetProvider + class Provider(InternetProvider): user_name_formats = ( diff --git a/faker/providers/isbn/__init__.py b/faker/providers/isbn/__init__.py index 2d6ace9c30..7967169636 100644 --- a/faker/providers/isbn/__init__.py +++ b/faker/providers/isbn/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import BaseProvider from .isbn import ISBN, ISBN10, ISBN13 from .rules import RULES diff --git a/faker/providers/job/ar_AA/__init__.py b/faker/providers/job/ar_AA/__init__.py index c92dc45265..216c387184 100644 --- a/faker/providers/job/ar_AA/__init__.py +++ b/faker/providers/job/ar_AA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/bs_BA/__init__.py b/faker/providers/job/bs_BA/__init__.py index 54ac244700..911cb6dd76 100644 --- a/faker/providers/job/bs_BA/__init__.py +++ b/faker/providers/job/bs_BA/__init__.py @@ -1,7 +1,9 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider + """ Data is provided by the official list of professions from National institue for statistics diff --git a/faker/providers/job/de_DE/__init__.py b/faker/providers/job/de_DE/__init__.py index 6f41f1acce..33f37885f8 100644 --- a/faker/providers/job/de_DE/__init__.py +++ b/faker/providers/job/de_DE/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/el_GR/__init__.py b/faker/providers/job/el_GR/__init__.py index e2d27a9228..e20b78905a 100644 --- a/faker/providers/job/el_GR/__init__.py +++ b/faker/providers/job/el_GR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/fa_IR/__init__.py b/faker/providers/job/fa_IR/__init__.py index 64957acdff..129fc51126 100644 --- a/faker/providers/job/fa_IR/__init__.py +++ b/faker/providers/job/fa_IR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/fi_FI/__init__.py b/faker/providers/job/fi_FI/__init__.py index 918914bfae..7d13c2cac2 100644 --- a/faker/providers/job/fi_FI/__init__.py +++ b/faker/providers/job/fi_FI/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/fr_CH/__init__.py b/faker/providers/job/fr_CH/__init__.py index d34838f37f..851912cbb1 100644 --- a/faker/providers/job/fr_CH/__init__.py +++ b/faker/providers/job/fr_CH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider # Source: SEFRI diff --git a/faker/providers/job/fr_FR/__init__.py b/faker/providers/job/fr_FR/__init__.py index 9fc4e71331..54c9f16d11 100644 --- a/faker/providers/job/fr_FR/__init__.py +++ b/faker/providers/job/fr_FR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider # Source: ONISEP diff --git a/faker/providers/job/hr_HR/__init__.py b/faker/providers/job/hr_HR/__init__.py index bc9aaf01d2..d142f0771f 100644 --- a/faker/providers/job/hr_HR/__init__.py +++ b/faker/providers/job/hr_HR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/hu_HU/__init__.py b/faker/providers/job/hu_HU/__init__.py index aacfb75731..6beb36088e 100644 --- a/faker/providers/job/hu_HU/__init__.py +++ b/faker/providers/job/hu_HU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import BaseProvider diff --git a/faker/providers/job/hy_AM/__init__.py b/faker/providers/job/hy_AM/__init__.py index 9758bd19f0..36f30a8f5d 100644 --- a/faker/providers/job/hy_AM/__init__.py +++ b/faker/providers/job/hy_AM/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/ja_JP/__init__.py b/faker/providers/job/ja_JP/__init__.py index 00a0ceb5bc..331bc68258 100644 --- a/faker/providers/job/ja_JP/__init__.py +++ b/faker/providers/job/ja_JP/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/ko_KR/__init__.py b/faker/providers/job/ko_KR/__init__.py index 3f2ee4515f..f153c43770 100644 --- a/faker/providers/job/ko_KR/__init__.py +++ b/faker/providers/job/ko_KR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/pl_PL/__init__.py b/faker/providers/job/pl_PL/__init__.py index 5d3d1ed9f8..719cc78f62 100644 --- a/faker/providers/job/pl_PL/__init__.py +++ b/faker/providers/job/pl_PL/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/pt_BR/__init__.py b/faker/providers/job/pt_BR/__init__.py index 058b39cb45..a5c0d1b0e6 100644 --- a/faker/providers/job/pt_BR/__init__.py +++ b/faker/providers/job/pt_BR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider # Source: Gist diff --git a/faker/providers/job/pt_PT/__init__.py b/faker/providers/job/pt_PT/__init__.py index 8d1d05d28b..8580e307b2 100644 --- a/faker/providers/job/pt_PT/__init__.py +++ b/faker/providers/job/pt_PT/__init__.py @@ -1,7 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as BaseProvider +from .. import Provider as BaseProvider # source: https://bit.ly/32nqRv7 diff --git a/faker/providers/job/ru_RU/__init__.py b/faker/providers/job/ru_RU/__init__.py index 8b8e1265f3..c2d3d9a8d2 100644 --- a/faker/providers/job/ru_RU/__init__.py +++ b/faker/providers/job/ru_RU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider # Russian jobs taken from the Wikipedia page diff --git a/faker/providers/job/th_TH/__init__.py b/faker/providers/job/th_TH/__init__.py index 35ea47c699..74b9da6cd1 100644 --- a/faker/providers/job/th_TH/__init__.py +++ b/faker/providers/job/th_TH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/uk_UA/__init__.py b/faker/providers/job/uk_UA/__init__.py index b68976a952..c06c34c935 100644 --- a/faker/providers/job/uk_UA/__init__.py +++ b/faker/providers/job/uk_UA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/zh_CN/__init__.py b/faker/providers/job/zh_CN/__init__.py index 7c09672c8d..698a31c899 100644 --- a/faker/providers/job/zh_CN/__init__.py +++ b/faker/providers/job/zh_CN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/job/zh_TW/__init__.py b/faker/providers/job/zh_TW/__init__.py index 7679b5ecc7..275e171441 100644 --- a/faker/providers/job/zh_TW/__init__.py +++ b/faker/providers/job/zh_TW/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/lorem/ar_AA/__init__.py b/faker/providers/lorem/ar_AA/__init__.py index 62a77f6f92..397d3a811b 100644 --- a/faker/providers/lorem/ar_AA/__init__.py +++ b/faker/providers/lorem/ar_AA/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/el_GR/__init__.py b/faker/providers/lorem/el_GR/__init__.py index 94cbe36258..bd88276f42 100644 --- a/faker/providers/lorem/el_GR/__init__.py +++ b/faker/providers/lorem/el_GR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/en_PH/__init__.py b/faker/providers/lorem/en_PH/__init__.py index 915d26806a..da36116370 100644 --- a/faker/providers/lorem/en_PH/__init__.py +++ b/faker/providers/lorem/en_PH/__init__.py @@ -1,7 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals -from ..la import Provider as LoremProvider + from ..en_US import Provider as EnUsProvider +from ..la import Provider as LoremProvider class Provider(LoremProvider): diff --git a/faker/providers/lorem/en_US/__init__.py b/faker/providers/lorem/en_US/__init__.py index 16a974ebe8..2a1a168594 100644 --- a/faker/providers/lorem/en_US/__init__.py +++ b/faker/providers/lorem/en_US/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/fil_PH/__init__.py b/faker/providers/lorem/fil_PH/__init__.py index 27766970ec..6e6212db13 100644 --- a/faker/providers/lorem/fil_PH/__init__.py +++ b/faker/providers/lorem/fil_PH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/fr_FR/__init__.py b/faker/providers/lorem/fr_FR/__init__.py index 8f1ccd57ed..f64985a2a6 100644 --- a/faker/providers/lorem/fr_FR/__init__.py +++ b/faker/providers/lorem/fr_FR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/he_IL/__init__.py b/faker/providers/lorem/he_IL/__init__.py index 01a6ad37b3..5ee995c16f 100644 --- a/faker/providers/lorem/he_IL/__init__.py +++ b/faker/providers/lorem/he_IL/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/hy_AM/__init__.py b/faker/providers/lorem/hy_AM/__init__.py index 81564e73ac..34d0e23c49 100644 --- a/faker/providers/lorem/hy_AM/__init__.py +++ b/faker/providers/lorem/hy_AM/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/la/__init__.py b/faker/providers/lorem/la/__init__.py index fed405fed6..2359356429 100644 --- a/faker/providers/lorem/la/__init__.py +++ b/faker/providers/lorem/la/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/pl_PL/__init__.py b/faker/providers/lorem/pl_PL/__init__.py index 8efca7b067..fef444e3ee 100644 --- a/faker/providers/lorem/pl_PL/__init__.py +++ b/faker/providers/lorem/pl_PL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/ru_RU/__init__.py b/faker/providers/lorem/ru_RU/__init__.py index cfc6eba928..4bd6442c18 100644 --- a/faker/providers/lorem/ru_RU/__init__.py +++ b/faker/providers/lorem/ru_RU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/th_TH/__init__.py b/faker/providers/lorem/th_TH/__init__.py index 2a4453b267..79ae2f46a2 100644 --- a/faker/providers/lorem/th_TH/__init__.py +++ b/faker/providers/lorem/th_TH/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/zh_CN/__init__.py b/faker/providers/lorem/zh_CN/__init__.py index cc8940db2e..f16cb42d28 100644 --- a/faker/providers/lorem/zh_CN/__init__.py +++ b/faker/providers/lorem/zh_CN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/lorem/zh_TW/__init__.py b/faker/providers/lorem/zh_TW/__init__.py index 07d7e98dc8..a1eda6c6c4 100644 --- a/faker/providers/lorem/zh_TW/__init__.py +++ b/faker/providers/lorem/zh_TW/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as LoremProvider diff --git a/faker/providers/misc/__init__.py b/faker/providers/misc/__init__.py index 068977a123..6a67542805 100644 --- a/faker/providers/misc/__init__.py +++ b/faker/providers/misc/__init__.py @@ -1,20 +1,20 @@ # coding=utf-8 from __future__ import unicode_literals + import csv import hashlib import io import string +import sys import tarfile import uuid -import sys import zipfile import six from .. import BaseProvider - localized = True csv.register_dialect('faker-csv', csv.excel, quoting=csv.QUOTE_ALL) diff --git a/faker/providers/misc/en_PH/__init__.py b/faker/providers/misc/en_PH/__init__.py index 0dc381bf22..2cb7b639df 100644 --- a/faker/providers/misc/en_PH/__init__.py +++ b/faker/providers/misc/en_PH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as MiscProvider diff --git a/faker/providers/person/__init__.py b/faker/providers/person/__init__.py index 3a8db7b0c1..fa53c167d2 100644 --- a/faker/providers/person/__init__.py +++ b/faker/providers/person/__init__.py @@ -2,7 +2,6 @@ from .. import BaseProvider - localized = True diff --git a/faker/providers/person/ar_AA/__init__.py b/faker/providers/person/ar_AA/__init__.py index 7a3077e1e1..4c664f2ddd 100644 --- a/faker/providers/person/ar_AA/__init__.py +++ b/faker/providers/person/ar_AA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/ar_PS/__init__.py b/faker/providers/person/ar_PS/__init__.py index a4a7dac3bc..9451a936f5 100644 --- a/faker/providers/person/ar_PS/__init__.py +++ b/faker/providers/person/ar_PS/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from ..ar_AA import Provider as ArabicPersonProvider diff --git a/faker/providers/person/ar_SA/__init__.py b/faker/providers/person/ar_SA/__init__.py index 00e3364682..404c9ee8bf 100644 --- a/faker/providers/person/ar_SA/__init__.py +++ b/faker/providers/person/ar_SA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from ..ar_AA import Provider as ArabicPersonProvider diff --git a/faker/providers/person/bg_BG/__init__.py b/faker/providers/person/bg_BG/__init__.py index 39930f17ea..37b380b0f1 100644 --- a/faker/providers/person/bg_BG/__init__.py +++ b/faker/providers/person/bg_BG/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/cs_CZ/__init__.py b/faker/providers/person/cs_CZ/__init__.py index eadb0f9ac6..869f75b483 100644 --- a/faker/providers/person/cs_CZ/__init__.py +++ b/faker/providers/person/cs_CZ/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from .. import Provider as PersonProvider diff --git a/faker/providers/person/de_AT/__init__.py b/faker/providers/person/de_AT/__init__.py index 72f23e6d22..9c206e7b38 100644 --- a/faker/providers/person/de_AT/__init__.py +++ b/faker/providers/person/de_AT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/de_CH/__init__.py b/faker/providers/person/de_CH/__init__.py index 49f733a028..c5aa6f4399 100644 --- a/faker/providers/person/de_CH/__init__.py +++ b/faker/providers/person/de_CH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/de_DE/__init__.py b/faker/providers/person/de_DE/__init__.py index f117f63d83..a1b27e17de 100644 --- a/faker/providers/person/de_DE/__init__.py +++ b/faker/providers/person/de_DE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/dk_DK/__init__.py b/faker/providers/person/dk_DK/__init__.py index 4c2200183e..9939906269 100644 --- a/faker/providers/person/dk_DK/__init__.py +++ b/faker/providers/person/dk_DK/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/el_GR/__init__.py b/faker/providers/person/el_GR/__init__.py index 1996294947..639d3aaf7b 100644 --- a/faker/providers/person/el_GR/__init__.py +++ b/faker/providers/person/el_GR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/en/__init__.py b/faker/providers/person/en/__init__.py index a28b4e8d4a..5e1ec52278 100644 --- a/faker/providers/person/en/__init__.py +++ b/faker/providers/person/en/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/en_GB/__init__.py b/faker/providers/person/en_GB/__init__.py index 81bff682c1..9d6880e482 100644 --- a/faker/providers/person/en_GB/__init__.py +++ b/faker/providers/person/en_GB/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as PersonProvider diff --git a/faker/providers/person/en_NZ/__init__.py b/faker/providers/person/en_NZ/__init__.py index 29064ee03a..66c32256d0 100644 --- a/faker/providers/person/en_NZ/__init__.py +++ b/faker/providers/person/en_NZ/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as PersonProvider diff --git a/faker/providers/person/en_TH/__init__.py b/faker/providers/person/en_TH/__init__.py index e913ee5cce..dc67604940 100644 --- a/faker/providers/person/en_TH/__init__.py +++ b/faker/providers/person/en_TH/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/en_US/__init__.py b/faker/providers/person/en_US/__init__.py index e14d22e909..0603d5e272 100644 --- a/faker/providers/person/en_US/__init__.py +++ b/faker/providers/person/en_US/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as PersonProvider diff --git a/faker/providers/person/es_CA/__init__.py b/faker/providers/person/es_CA/__init__.py index bfc4d8bb14..614557ec77 100644 --- a/faker/providers/person/es_CA/__init__.py +++ b/faker/providers/person/es_CA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from ..es_ES import Provider as PersonProvider diff --git a/faker/providers/person/es_ES/__init__.py b/faker/providers/person/es_ES/__init__.py index b1e61b5fa3..cc354abf79 100644 --- a/faker/providers/person/es_ES/__init__.py +++ b/faker/providers/person/es_ES/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/es_MX/__init__.py b/faker/providers/person/es_MX/__init__.py index f6c60bc81b..02ad697738 100644 --- a/faker/providers/person/es_MX/__init__.py +++ b/faker/providers/person/es_MX/__init__.py @@ -1,5 +1,6 @@ # -*- encoding: utf-8 -*- from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/fa_IR/__init__.py b/faker/providers/person/fa_IR/__init__.py index 83c7b7b794..9ee8f279b4 100644 --- a/faker/providers/person/fa_IR/__init__.py +++ b/faker/providers/person/fa_IR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/fi_FI/__init__.py b/faker/providers/person/fi_FI/__init__.py index 1a353b9669..217d2b4999 100644 --- a/faker/providers/person/fi_FI/__init__.py +++ b/faker/providers/person/fi_FI/__init__.py @@ -1,8 +1,10 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as PersonProvider + from collections import OrderedDict +from .. import Provider as PersonProvider + class Provider(PersonProvider): diff --git a/faker/providers/person/fr_CH/__init__.py b/faker/providers/person/fr_CH/__init__.py index a16c897b6e..50cbd80edf 100644 --- a/faker/providers/person/fr_CH/__init__.py +++ b/faker/providers/person/fr_CH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/fr_FR/__init__.py b/faker/providers/person/fr_FR/__init__.py index 7c6475788d..b094092db5 100644 --- a/faker/providers/person/fr_FR/__init__.py +++ b/faker/providers/person/fr_FR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/he_IL/__init__.py b/faker/providers/person/he_IL/__init__.py index d57a564632..8c5983d4be 100644 --- a/faker/providers/person/he_IL/__init__.py +++ b/faker/providers/person/he_IL/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as PersonProvider diff --git a/faker/providers/person/hi_IN/__init__.py b/faker/providers/person/hi_IN/__init__.py index 29a73fd148..76902e0030 100644 --- a/faker/providers/person/hi_IN/__init__.py +++ b/faker/providers/person/hi_IN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/hr_HR/__init__.py b/faker/providers/person/hr_HR/__init__.py index 1cbaf1fa14..71e49f27f1 100755 --- a/faker/providers/person/hr_HR/__init__.py +++ b/faker/providers/person/hr_HR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/hu_HU/__init__.py b/faker/providers/person/hu_HU/__init__.py index f80a1bf049..5998ba3c5b 100644 --- a/faker/providers/person/hu_HU/__init__.py +++ b/faker/providers/person/hu_HU/__init__.py @@ -1,8 +1,9 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict -from .. import Provider as PersonProvider +from .. import Provider as PersonProvider # Data source # diff --git a/faker/providers/person/hy_AM/__init__.py b/faker/providers/person/hy_AM/__init__.py index 992a575218..9e67d9bdef 100644 --- a/faker/providers/person/hy_AM/__init__.py +++ b/faker/providers/person/hy_AM/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/id_ID/__init__.py b/faker/providers/person/id_ID/__init__.py index 201bbee227..a8a8b97feb 100644 --- a/faker/providers/person/id_ID/__init__.py +++ b/faker/providers/person/id_ID/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/it_IT/__init__.py b/faker/providers/person/it_IT/__init__.py index 28e6c1ca52..6c1ff1db33 100644 --- a/faker/providers/person/it_IT/__init__.py +++ b/faker/providers/person/it_IT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/ja_JP/__init__.py b/faker/providers/person/ja_JP/__init__.py index 49bd9ca2c5..1fdbbf3b20 100644 --- a/faker/providers/person/ja_JP/__init__.py +++ b/faker/providers/person/ja_JP/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/ko_KR/__init__.py b/faker/providers/person/ko_KR/__init__.py index 314c13964d..03cc721e96 100644 --- a/faker/providers/person/ko_KR/__init__.py +++ b/faker/providers/person/ko_KR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as PersonProvider diff --git a/faker/providers/person/lt_LT/__init__.py b/faker/providers/person/lt_LT/__init__.py index 9962c030bc..74d0949945 100644 --- a/faker/providers/person/lt_LT/__init__.py +++ b/faker/providers/person/lt_LT/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/lv_LV/__init__.py b/faker/providers/person/lv_LV/__init__.py index 611d97f9da..4532a52f99 100644 --- a/faker/providers/person/lv_LV/__init__.py +++ b/faker/providers/person/lv_LV/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/ne_NP/__init__.py b/faker/providers/person/ne_NP/__init__.py index bd1a6889e9..5a97b0d71a 100644 --- a/faker/providers/person/ne_NP/__init__.py +++ b/faker/providers/person/ne_NP/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/nl_NL/__init__.py b/faker/providers/person/nl_NL/__init__.py index c62d7784c6..ac90c9060d 100644 --- a/faker/providers/person/nl_NL/__init__.py +++ b/faker/providers/person/nl_NL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/no_NO/__init__.py b/faker/providers/person/no_NO/__init__.py index 5444dba795..653fa995a2 100644 --- a/faker/providers/person/no_NO/__init__.py +++ b/faker/providers/person/no_NO/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/pl_PL/__init__.py b/faker/providers/person/pl_PL/__init__.py index 5f0b35c2db..075331320b 100644 --- a/faker/providers/person/pl_PL/__init__.py +++ b/faker/providers/person/pl_PL/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/pt_BR/__init__.py b/faker/providers/person/pt_BR/__init__.py index 848787444c..5fc8b2c76b 100644 --- a/faker/providers/person/pt_BR/__init__.py +++ b/faker/providers/person/pt_BR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/pt_PT/__init__.py b/faker/providers/person/pt_PT/__init__.py index 8cdc7b46db..6a76252c07 100644 --- a/faker/providers/person/pt_PT/__init__.py +++ b/faker/providers/person/pt_PT/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/ro_RO/__init__.py b/faker/providers/person/ro_RO/__init__.py index f14b458818..92baf52ea3 100644 --- a/faker/providers/person/ro_RO/__init__.py +++ b/faker/providers/person/ro_RO/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/ru_RU/__init__.py b/faker/providers/person/ru_RU/__init__.py index fd582cc151..12a2ecef40 100644 --- a/faker/providers/person/ru_RU/__init__.py +++ b/faker/providers/person/ru_RU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict from .. import Provider as PersonProvider diff --git a/faker/providers/person/sl_SI/__init__.py b/faker/providers/person/sl_SI/__init__.py index 892b67d6de..ed08a7b3c7 100755 --- a/faker/providers/person/sl_SI/__init__.py +++ b/faker/providers/person/sl_SI/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/sv_SE/__init__.py b/faker/providers/person/sv_SE/__init__.py index f55e92e830..31e4e044ee 100644 --- a/faker/providers/person/sv_SE/__init__.py +++ b/faker/providers/person/sv_SE/__init__.py @@ -1,7 +1,9 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from .. import Provider as PersonProvider # Data source diff --git a/faker/providers/person/ta_IN/__init__.py b/faker/providers/person/ta_IN/__init__.py index 974b43d328..0748220261 100644 --- a/faker/providers/person/ta_IN/__init__.py +++ b/faker/providers/person/ta_IN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/th_TH/__init__.py b/faker/providers/person/th_TH/__init__.py index eb784ae21e..78f6095ebc 100644 --- a/faker/providers/person/th_TH/__init__.py +++ b/faker/providers/person/th_TH/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/tr_TR/__init__.py b/faker/providers/person/tr_TR/__init__.py index 469cee08e7..95b2f46179 100644 --- a/faker/providers/person/tr_TR/__init__.py +++ b/faker/providers/person/tr_TR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PersonProvider diff --git a/faker/providers/person/zh_CN/__init__.py b/faker/providers/person/zh_CN/__init__.py index 5c79395950..4fc1b2b20f 100644 --- a/faker/providers/person/zh_CN/__init__.py +++ b/faker/providers/person/zh_CN/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from .. import Provider as PersonProvider diff --git a/faker/providers/person/zh_TW/__init__.py b/faker/providers/person/zh_TW/__init__.py index 6b3ab5d8ab..ea9c5af244 100644 --- a/faker/providers/person/zh_TW/__init__.py +++ b/faker/providers/person/zh_TW/__init__.py @@ -1,6 +1,8 @@ # coding=utf-8 from __future__ import unicode_literals + from collections import OrderedDict + from .. import Provider as PersonProvider diff --git a/faker/providers/phone_number/ar_JO/__init__.py b/faker/providers/phone_number/ar_JO/__init__.py index 4c234877cb..877b071764 100644 --- a/faker/providers/phone_number/ar_JO/__init__.py +++ b/faker/providers/phone_number/ar_JO/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/ar_PS/__init__.py b/faker/providers/phone_number/ar_PS/__init__.py index b3b6188ea9..9c64e4872c 100644 --- a/faker/providers/phone_number/ar_PS/__init__.py +++ b/faker/providers/phone_number/ar_PS/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/bg_BG/__init__.py b/faker/providers/phone_number/bg_BG/__init__.py index a622f393ef..4b0d7d3184 100755 --- a/faker/providers/phone_number/bg_BG/__init__.py +++ b/faker/providers/phone_number/bg_BG/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/bs_BA/__init__.py b/faker/providers/phone_number/bs_BA/__init__.py index ed9492308f..5130e533b1 100644 --- a/faker/providers/phone_number/bs_BA/__init__.py +++ b/faker/providers/phone_number/bs_BA/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/cs_CZ/__init__.py b/faker/providers/phone_number/cs_CZ/__init__.py index 7c1c26ccc8..966990047f 100644 --- a/faker/providers/phone_number/cs_CZ/__init__.py +++ b/faker/providers/phone_number/cs_CZ/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/de_DE/__init__.py b/faker/providers/phone_number/de_DE/__init__.py index e9a7fdfa5a..5aa7dc617a 100644 --- a/faker/providers/phone_number/de_DE/__init__.py +++ b/faker/providers/phone_number/de_DE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/dk_DK/__init__.py b/faker/providers/phone_number/dk_DK/__init__.py index 9624dc6fa3..2802aef318 100644 --- a/faker/providers/phone_number/dk_DK/__init__.py +++ b/faker/providers/phone_number/dk_DK/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/el_GR/__init__.py b/faker/providers/phone_number/el_GR/__init__.py index f1dd632f58..3974304a5b 100644 --- a/faker/providers/phone_number/el_GR/__init__.py +++ b/faker/providers/phone_number/el_GR/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/en_AU/__init__.py b/faker/providers/phone_number/en_AU/__init__.py index 3331699e09..ecf13f51c2 100644 --- a/faker/providers/phone_number/en_AU/__init__.py +++ b/faker/providers/phone_number/en_AU/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/en_CA/__init__.py b/faker/providers/phone_number/en_CA/__init__.py index 8b2a8b528f..4cb74fb5fd 100644 --- a/faker/providers/phone_number/en_CA/__init__.py +++ b/faker/providers/phone_number/en_CA/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/en_GB/__init__.py b/faker/providers/phone_number/en_GB/__init__.py index e53d41271b..7b31b3f57a 100644 --- a/faker/providers/phone_number/en_GB/__init__.py +++ b/faker/providers/phone_number/en_GB/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/en_NZ/__init__.py b/faker/providers/phone_number/en_NZ/__init__.py index 478df3f8cb..ce76853b60 100644 --- a/faker/providers/phone_number/en_NZ/__init__.py +++ b/faker/providers/phone_number/en_NZ/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/en_PH/__init__.py b/faker/providers/phone_number/en_PH/__init__.py index f0ff95b7ed..26f8f0b86a 100644 --- a/faker/providers/phone_number/en_PH/__init__.py +++ b/faker/providers/phone_number/en_PH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from ... import BaseProvider diff --git a/faker/providers/phone_number/en_US/__init__.py b/faker/providers/phone_number/en_US/__init__.py index 59730a8e9a..8de475fcde 100644 --- a/faker/providers/phone_number/en_US/__init__.py +++ b/faker/providers/phone_number/en_US/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/es_ES/__init__.py b/faker/providers/phone_number/es_ES/__init__.py index 80ef8846d0..f10c89ff48 100644 --- a/faker/providers/phone_number/es_ES/__init__.py +++ b/faker/providers/phone_number/es_ES/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/es_MX/__init__.py b/faker/providers/phone_number/es_MX/__init__.py index 5d72cce43f..391d71afd4 100644 --- a/faker/providers/phone_number/es_MX/__init__.py +++ b/faker/providers/phone_number/es_MX/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/fa_IR/__init__.py b/faker/providers/phone_number/fa_IR/__init__.py index ed6a1acb27..cf0382e47e 100644 --- a/faker/providers/phone_number/fa_IR/__init__.py +++ b/faker/providers/phone_number/fa_IR/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/fi_FI/__init__.py b/faker/providers/phone_number/fi_FI/__init__.py index 09e80f2dfd..869c7e4810 100644 --- a/faker/providers/phone_number/fi_FI/__init__.py +++ b/faker/providers/phone_number/fi_FI/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/fr_CH/__init__.py b/faker/providers/phone_number/fr_CH/__init__.py index df7f6dc58d..c0d7a83265 100644 --- a/faker/providers/phone_number/fr_CH/__init__.py +++ b/faker/providers/phone_number/fr_CH/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/fr_FR/__init__.py b/faker/providers/phone_number/fr_FR/__init__.py index 03b56fa331..e5616fba4c 100644 --- a/faker/providers/phone_number/fr_FR/__init__.py +++ b/faker/providers/phone_number/fr_FR/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/he_IL/__init__.py b/faker/providers/phone_number/he_IL/__init__.py index ce1f7a5518..042015b173 100644 --- a/faker/providers/phone_number/he_IL/__init__.py +++ b/faker/providers/phone_number/he_IL/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/hi_IN/__init__.py b/faker/providers/phone_number/hi_IN/__init__.py index c696b985f8..9066e4cadb 100644 --- a/faker/providers/phone_number/hi_IN/__init__.py +++ b/faker/providers/phone_number/hi_IN/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/hr_HR/__init__.py b/faker/providers/phone_number/hr_HR/__init__.py index 3e0a103837..b70c60b1dd 100755 --- a/faker/providers/phone_number/hr_HR/__init__.py +++ b/faker/providers/phone_number/hr_HR/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/hu_HU/__init__.py b/faker/providers/phone_number/hu_HU/__init__.py index a2931eba9a..5bbf1c385a 100644 --- a/faker/providers/phone_number/hu_HU/__init__.py +++ b/faker/providers/phone_number/hu_HU/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/hy_AM/__init__.py b/faker/providers/phone_number/hy_AM/__init__.py index 4af58b2f94..0927a8f9b6 100644 --- a/faker/providers/phone_number/hy_AM/__init__.py +++ b/faker/providers/phone_number/hy_AM/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/id_ID/__init__.py b/faker/providers/phone_number/id_ID/__init__.py index a149c5d86a..d0f29efd25 100644 --- a/faker/providers/phone_number/id_ID/__init__.py +++ b/faker/providers/phone_number/id_ID/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/it_IT/__init__.py b/faker/providers/phone_number/it_IT/__init__.py index 488f825c1a..0728c119ed 100644 --- a/faker/providers/phone_number/it_IT/__init__.py +++ b/faker/providers/phone_number/it_IT/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/ja_JP/__init__.py b/faker/providers/phone_number/ja_JP/__init__.py index 45511d88f4..aa8e2d9f34 100644 --- a/faker/providers/phone_number/ja_JP/__init__.py +++ b/faker/providers/phone_number/ja_JP/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/ko_KR/__init__.py b/faker/providers/phone_number/ko_KR/__init__.py index 04680989d6..6016fa2534 100644 --- a/faker/providers/phone_number/ko_KR/__init__.py +++ b/faker/providers/phone_number/ko_KR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/lt_LT/__init__.py b/faker/providers/phone_number/lt_LT/__init__.py index 58c06cdfca..c963df9263 100644 --- a/faker/providers/phone_number/lt_LT/__init__.py +++ b/faker/providers/phone_number/lt_LT/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/lv_LV/__init__.py b/faker/providers/phone_number/lv_LV/__init__.py index 74f8647d37..ba821d8a74 100644 --- a/faker/providers/phone_number/lv_LV/__init__.py +++ b/faker/providers/phone_number/lv_LV/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/ne_NP/__init__.py b/faker/providers/phone_number/ne_NP/__init__.py index 08a236cff7..e7a0bb28f2 100644 --- a/faker/providers/phone_number/ne_NP/__init__.py +++ b/faker/providers/phone_number/ne_NP/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/nl_BE/__init__.py b/faker/providers/phone_number/nl_BE/__init__.py index 2c6177fd70..44d097c6f3 100644 --- a/faker/providers/phone_number/nl_BE/__init__.py +++ b/faker/providers/phone_number/nl_BE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/nl_NL/__init__.py b/faker/providers/phone_number/nl_NL/__init__.py index efc2af4f7d..3b6f35311f 100644 --- a/faker/providers/phone_number/nl_NL/__init__.py +++ b/faker/providers/phone_number/nl_NL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/no_NO/__init__.py b/faker/providers/phone_number/no_NO/__init__.py index ef734d440c..4a7cad292a 100644 --- a/faker/providers/phone_number/no_NO/__init__.py +++ b/faker/providers/phone_number/no_NO/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/pl_PL/__init__.py b/faker/providers/phone_number/pl_PL/__init__.py index b276d96b09..d92e2ca4ac 100644 --- a/faker/providers/phone_number/pl_PL/__init__.py +++ b/faker/providers/phone_number/pl_PL/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/pt_BR/__init__.py b/faker/providers/phone_number/pt_BR/__init__.py index ca3efbd33e..c26b997413 100644 --- a/faker/providers/phone_number/pt_BR/__init__.py +++ b/faker/providers/phone_number/pt_BR/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/pt_PT/__init__.py b/faker/providers/phone_number/pt_PT/__init__.py index abdb14dcd8..88cf4535c6 100644 --- a/faker/providers/phone_number/pt_PT/__init__.py +++ b/faker/providers/phone_number/pt_PT/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/ru_RU/__init__.py b/faker/providers/phone_number/ru_RU/__init__.py index 4198b78f60..1d3f73ecdb 100644 --- a/faker/providers/phone_number/ru_RU/__init__.py +++ b/faker/providers/phone_number/ru_RU/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/sk_SK/__init__.py b/faker/providers/phone_number/sk_SK/__init__.py index f3df45fae4..591474b57e 100644 --- a/faker/providers/phone_number/sk_SK/__init__.py +++ b/faker/providers/phone_number/sk_SK/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/sl_SI/__init__.py b/faker/providers/phone_number/sl_SI/__init__.py index 4b47cd5cab..e090b105ee 100755 --- a/faker/providers/phone_number/sl_SI/__init__.py +++ b/faker/providers/phone_number/sl_SI/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/sv_SE/__init__.py b/faker/providers/phone_number/sv_SE/__init__.py index 60edf27182..1b6d1a1045 100644 --- a/faker/providers/phone_number/sv_SE/__init__.py +++ b/faker/providers/phone_number/sv_SE/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/ta_IN/__init__.py b/faker/providers/phone_number/ta_IN/__init__.py index c696b985f8..9066e4cadb 100644 --- a/faker/providers/phone_number/ta_IN/__init__.py +++ b/faker/providers/phone_number/ta_IN/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/th_TH/__init__.py b/faker/providers/phone_number/th_TH/__init__.py index 609bbb2182..262a946ed5 100644 --- a/faker/providers/phone_number/th_TH/__init__.py +++ b/faker/providers/phone_number/th_TH/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/tr_TR/__init__.py b/faker/providers/phone_number/tr_TR/__init__.py index be8ce61353..aba7ba7733 100644 --- a/faker/providers/phone_number/tr_TR/__init__.py +++ b/faker/providers/phone_number/tr_TR/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/tw_GH/__init__.py b/faker/providers/phone_number/tw_GH/__init__.py index f1552c91bc..af87e64396 100644 --- a/faker/providers/phone_number/tw_GH/__init__.py +++ b/faker/providers/phone_number/tw_GH/__init__.py @@ -1,4 +1,5 @@ from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/uk_UA/__init__.py b/faker/providers/phone_number/uk_UA/__init__.py index 1d72e3b4a8..82b942ca78 100644 --- a/faker/providers/phone_number/uk_UA/__init__.py +++ b/faker/providers/phone_number/uk_UA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/zh_CN/__init__.py b/faker/providers/phone_number/zh_CN/__init__.py index 7de9e071ca..008f738739 100644 --- a/faker/providers/phone_number/zh_CN/__init__.py +++ b/faker/providers/phone_number/zh_CN/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider diff --git a/faker/providers/phone_number/zh_TW/__init__.py b/faker/providers/phone_number/zh_TW/__init__.py index bdb1819605..e05dd7730f 100644 --- a/faker/providers/phone_number/zh_TW/__init__.py +++ b/faker/providers/phone_number/zh_TW/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as PhoneNumberProvider # phone number from https://en.wikipedia.org/wiki/Telephone_numbers_in_Taiwan diff --git a/faker/providers/profile/__init__.py b/faker/providers/profile/__init__.py index a0def3f61f..af2e868891 100644 --- a/faker/providers/profile/__init__.py +++ b/faker/providers/profile/__init__.py @@ -1,8 +1,9 @@ # coding=utf-8 -from .. import BaseProvider import itertools +from .. import BaseProvider + class Provider(BaseProvider): """ diff --git a/faker/providers/python/__init__.py b/faker/providers/python/__init__.py index 9ea61d1a1b..bcccab43a1 100644 --- a/faker/providers/python/__init__.py +++ b/faker/providers/python/__init__.py @@ -2,10 +2,11 @@ from __future__ import unicode_literals -from decimal import Decimal import string import sys +from decimal import Decimal + import six from .. import BaseProvider diff --git a/faker/providers/ssn/en_CA/__init__.py b/faker/providers/ssn/en_CA/__init__.py index 7c80011b26..70848846ee 100644 --- a/faker/providers/ssn/en_CA/__init__.py +++ b/faker/providers/ssn/en_CA/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/en_GB/__init__.py b/faker/providers/ssn/en_GB/__init__.py index 6ada182f1a..88e5036500 100644 --- a/faker/providers/ssn/en_GB/__init__.py +++ b/faker/providers/ssn/en_GB/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/ssn/en_PH/__init__.py b/faker/providers/ssn/en_PH/__init__.py index 7d0dae4f50..36d6cdf060 100644 --- a/faker/providers/ssn/en_PH/__init__.py +++ b/faker/providers/ssn/en_PH/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from ... import BaseProvider diff --git a/faker/providers/ssn/es_MX/__init__.py b/faker/providers/ssn/es_MX/__init__.py index e3b5124229..072da02592 100644 --- a/faker/providers/ssn/es_MX/__init__.py +++ b/faker/providers/ssn/es_MX/__init__.py @@ -14,7 +14,6 @@ from .. import Provider as BaseProvider - ALPHABET = string.ascii_uppercase ALPHANUMERIC = string.digits + ALPHABET VOWELS = "AEIOU" diff --git a/faker/providers/ssn/et_EE/__init__.py b/faker/providers/ssn/et_EE/__init__.py index ed0ad8dd9b..3465bb4f8e 100644 --- a/faker/providers/ssn/et_EE/__init__.py +++ b/faker/providers/ssn/et_EE/__init__.py @@ -1,10 +1,12 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as SsnProvider + import datetime import operator +from .. import Provider as SsnProvider + def checksum(digits): """Calculate checksum of Estonian personal identity code. diff --git a/faker/providers/ssn/fi_FI/__init__.py b/faker/providers/ssn/fi_FI/__init__.py index 3fd767324e..a426eed009 100644 --- a/faker/providers/ssn/fi_FI/__init__.py +++ b/faker/providers/ssn/fi_FI/__init__.py @@ -1,9 +1,11 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as SsnProvider + import datetime +from .. import Provider as SsnProvider + class Provider(SsnProvider): diff --git a/faker/providers/ssn/fr_CH/__init__.py b/faker/providers/ssn/fr_CH/__init__.py index 90ec0ef96b..d445af8efb 100644 --- a/faker/providers/ssn/fr_CH/__init__.py +++ b/faker/providers/ssn/fr_CH/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/he_IL/__init__.py b/faker/providers/ssn/he_IL/__init__.py index ce0d037e92..0ac6265a3b 100644 --- a/faker/providers/ssn/he_IL/__init__.py +++ b/faker/providers/ssn/he_IL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/hr_HR/__init__.py b/faker/providers/ssn/hr_HR/__init__.py index a4d7388519..e2d9681cc3 100644 --- a/faker/providers/ssn/hr_HR/__init__.py +++ b/faker/providers/ssn/hr_HR/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/hu_HU/__init__.py b/faker/providers/ssn/hu_HU/__init__.py index 8c27f14c69..1bc3953c49 100644 --- a/faker/providers/ssn/hu_HU/__init__.py +++ b/faker/providers/ssn/hu_HU/__init__.py @@ -1,9 +1,11 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as SsnProvider + from functools import reduce from math import fmod +from .. import Provider as SsnProvider + def zfix(d): if d < 10: diff --git a/faker/providers/ssn/it_IT/__init__.py b/faker/providers/ssn/it_IT/__init__.py index 2382b268bf..3dc7490fea 100644 --- a/faker/providers/ssn/it_IT/__init__.py +++ b/faker/providers/ssn/it_IT/__init__.py @@ -2,9 +2,10 @@ """it_IT ssn provider (yields italian fiscal codes)""" from __future__ import unicode_literals + from string import ascii_uppercase, digits -from .. import Provider as SsnProvider +from .. import Provider as SsnProvider ALPHANUMERICS = sorted(digits + ascii_uppercase) ALPHANUMERICS_DICT = {char: index for index, char in enumerate(ALPHANUMERICS)} diff --git a/faker/providers/ssn/ko_KR/__init__.py b/faker/providers/ssn/ko_KR/__init__.py index 517857e1bc..9beb7d09ef 100644 --- a/faker/providers/ssn/ko_KR/__init__.py +++ b/faker/providers/ssn/ko_KR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/nl_BE/__init__.py b/faker/providers/ssn/nl_BE/__init__.py index e2ee1e955b..e5115f58f9 100644 --- a/faker/providers/ssn/nl_BE/__init__.py +++ b/faker/providers/ssn/nl_BE/__init__.py @@ -1,8 +1,10 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider + """ For more info on rijksregisternummer, see https://nl.wikipedia.org/wiki/Rijksregisternummer Dutch/French only for now ... diff --git a/faker/providers/ssn/nl_NL/__init__.py b/faker/providers/ssn/nl_NL/__init__.py index 48a75c5392..09a4ccd066 100644 --- a/faker/providers/ssn/nl_NL/__init__.py +++ b/faker/providers/ssn/nl_NL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/no_NO/__init__.py b/faker/providers/ssn/no_NO/__init__.py index ead2b08a69..812b738eac 100644 --- a/faker/providers/ssn/no_NO/__init__.py +++ b/faker/providers/ssn/no_NO/__init__.py @@ -1,10 +1,12 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as SsnProvider + import datetime import operator +from .. import Provider as SsnProvider + def checksum(digits, scale): """ diff --git a/faker/providers/ssn/pl_PL/__init__.py b/faker/providers/ssn/pl_PL/__init__.py index 1b668c767e..36666d5452 100644 --- a/faker/providers/ssn/pl_PL/__init__.py +++ b/faker/providers/ssn/pl_PL/__init__.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/ru_RU/__init__.py b/faker/providers/ssn/ru_RU/__init__.py index 99f2f845f5..70bfc95207 100644 --- a/faker/providers/ssn/ru_RU/__init__.py +++ b/faker/providers/ssn/ru_RU/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/ssn/sv_SE/__init__.py b/faker/providers/ssn/sv_SE/__init__.py index ad9a28137e..6d5c44dfae 100644 --- a/faker/providers/ssn/sv_SE/__init__.py +++ b/faker/providers/ssn/sv_SE/__init__.py @@ -1,10 +1,12 @@ # coding=utf-8 from __future__ import unicode_literals -from .. import Provider as SsnProvider + import datetime import random +from .. import Provider as SsnProvider + class Provider(SsnProvider): diff --git a/faker/providers/ssn/tr_TR/__init__.py b/faker/providers/ssn/tr_TR/__init__.py index d8975f84c5..90edf1267c 100644 --- a/faker/providers/ssn/tr_TR/__init__.py +++ b/faker/providers/ssn/tr_TR/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as BaseProvider diff --git a/faker/providers/ssn/zh_CN/__init__.py b/faker/providers/ssn/zh_CN/__init__.py index 376c22d9b8..f0126ed82e 100644 --- a/faker/providers/ssn/zh_CN/__init__.py +++ b/faker/providers/ssn/zh_CN/__init__.py @@ -1,7 +1,9 @@ from __future__ import unicode_literals -from .. import Provider as SsnProvider + import datetime +from .. import Provider as SsnProvider + class Provider(SsnProvider): # Extracted from diff --git a/faker/providers/ssn/zh_TW/__init__.py b/faker/providers/ssn/zh_TW/__init__.py index 3eec5bd6eb..61db2da46f 100644 --- a/faker/providers/ssn/zh_TW/__init__.py +++ b/faker/providers/ssn/zh_TW/__init__.py @@ -1,5 +1,6 @@ # coding=utf-8 from __future__ import unicode_literals + from .. import Provider as SsnProvider diff --git a/faker/providers/user_agent/__init__.py b/faker/providers/user_agent/__init__.py index 6f9e9b11e7..bcf55f4497 100644 --- a/faker/providers/user_agent/__init__.py +++ b/faker/providers/user_agent/__init__.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import string + from datetime import datetime from .. import BaseProvider diff --git a/faker/proxy.py b/faker/proxy.py index a91b40c775..f84f71405f 100644 --- a/faker/proxy.py +++ b/faker/proxy.py @@ -2,9 +2,11 @@ from __future__ import absolute_import, unicode_literals -from collections import OrderedDict import random import re + +from collections import OrderedDict + import six from faker.config import DEFAULT_LOCALE diff --git a/tests/providers/__init__.py b/tests/providers/__init__.py index e0bdb8bb75..915858fbd7 100644 --- a/tests/providers/__init__.py +++ b/tests/providers/__init__.py @@ -1,4 +1,5 @@ import unittest + from faker import Faker diff --git a/tests/providers/test_address.py b/tests/providers/test_address.py index 345a9ea6fe..a3e8498cee 100644 --- a/tests/providers/test_address.py +++ b/tests/providers/test_address.py @@ -5,25 +5,25 @@ import re import unittest -from ukpostcodeparser.parser import parse_uk_postcode +from six import string_types from faker import Faker from faker.providers.address.de_AT import Provider as DeAtProvider from faker.providers.address.de_DE import Provider as DeProvider -from faker.providers.address.fa_IR import Provider as IrProvider from faker.providers.address.el_GR import Provider as GrProvider from faker.providers.address.en_AU import Provider as EnAuProvider from faker.providers.address.en_CA import Provider as EnCaProvider from faker.providers.address.en_US import Provider as EnUsProvider from faker.providers.address.es_ES import Provider as EsEsProvider from faker.providers.address.es_MX import Provider as EsMxProvider -from faker.providers.address.fr_FR import Provider as FrFrProvider +from faker.providers.address.fa_IR import Provider as IrProvider from faker.providers.address.fi_FI import Provider as FiProvider +from faker.providers.address.fr_FR import Provider as FrFrProvider from faker.providers.address.hy_AM import Provider as HyAmProvider -from faker.providers.address.pt_PT import Provider as PtPtProvider from faker.providers.address.ja_JP import Provider as JaProvider from faker.providers.address.ne_NP import Provider as NeProvider -from six import string_types +from faker.providers.address.pt_PT import Provider as PtPtProvider +from ukpostcodeparser.parser import parse_uk_postcode class TestBaseProvider(unittest.TestCase): diff --git a/tests/providers/test_automotive.py b/tests/providers/test_automotive.py index 883d53a8f5..ecfba925bc 100644 --- a/tests/providers/test_automotive.py +++ b/tests/providers/test_automotive.py @@ -4,9 +4,10 @@ import re import unittest -from faker import Faker from six import string_types +from faker import Faker + class TestPtBR(unittest.TestCase): diff --git a/tests/providers/test_color.py b/tests/providers/test_color.py index a65e2ffd59..cb3b403a6b 100644 --- a/tests/providers/test_color.py +++ b/tests/providers/test_color.py @@ -1,15 +1,18 @@ import copy -import unittest import random import re +import unittest + from re import search -from faker import Faker -from faker.providers.color import RandomColor -from faker.providers.color.hy_AM import Provider as HyAmProvider import six + from six import string_types +from faker import Faker +from faker.providers.color import RandomColor +from faker.providers.color.hy_AM import Provider as HyAmProvider + class TestColor(unittest.TestCase): diff --git a/tests/providers/test_company.py b/tests/providers/test_company.py index 3a2e2bb422..9415a7a332 100644 --- a/tests/providers/test_company.py +++ b/tests/providers/test_company.py @@ -12,9 +12,8 @@ from faker.providers.company.hy_AM import Provider as HyAmProvider from faker.providers.company.ja_JP import Provider as JaProvider from faker.providers.company.nl_NL import Provider as NlProvider -from faker.providers.company.pl_PL import ( - company_vat_checksum, regon_checksum, local_regon_checksum, Provider as PlProvider, -) +from faker.providers.company.pl_PL import Provider as PlProvider +from faker.providers.company.pl_PL import company_vat_checksum, local_regon_checksum, regon_checksum from faker.providers.company.pt_BR import company_id_checksum from faker.utils.datetime_safe import datetime diff --git a/tests/providers/test_date_time.py b/tests/providers/test_date_time.py index c66e4aebef..6d79ff6e8a 100644 --- a/tests/providers/test_date_time.py +++ b/tests/providers/test_date_time.py @@ -1,24 +1,27 @@ # coding: utf-8 from __future__ import unicode_literals -from datetime import date, datetime, timedelta, tzinfo -from datetime import time as datetime_time import os import platform -import pytest import random import sys import time import unittest +from datetime import date, datetime +from datetime import time as datetime_time +from datetime import timedelta, tzinfo + import six +import pytest + from faker import Faker from faker.providers.date_time import Provider as DatetimeProvider -from faker.providers.date_time.pl_PL import Provider as PlProvider from faker.providers.date_time.ar_AA import Provider as ArProvider from faker.providers.date_time.ar_EG import Provider as EgProvider from faker.providers.date_time.hy_AM import Provider as HyAmProvider +from faker.providers.date_time.pl_PL import Provider as PlProvider from faker.providers.date_time.ta_IN import Provider as TaInProvider diff --git a/tests/providers/test_file.py b/tests/providers/test_file.py index 8ac26cc67e..9293c3d448 100644 --- a/tests/providers/test_file.py +++ b/tests/providers/test_file.py @@ -1,7 +1,7 @@ from __future__ import unicode_literals -import unittest import re +import unittest from faker import Faker diff --git a/tests/providers/test_geo.py b/tests/providers/test_geo.py index 8d2e7326d7..d99fb7c595 100644 --- a/tests/providers/test_geo.py +++ b/tests/providers/test_geo.py @@ -4,7 +4,9 @@ import re import unittest + from decimal import Decimal + from six import string_types from faker import Faker diff --git a/tests/providers/test_internet.py b/tests/providers/test_internet.py index 44d9f6495f..03f58e5615 100644 --- a/tests/providers/test_internet.py +++ b/tests/providers/test_internet.py @@ -2,21 +2,24 @@ from __future__ import unicode_literals +import unittest + from itertools import cycle -import unittest -try: - from unittest import mock -except ImportError: - import mock -import pytest import six -from validators import email as validate_email, domain as validate_domain +import pytest from faker import Faker from faker.providers.person.ja_JP import Provider as JaProvider from faker.utils import text +from validators import domain as validate_domain +from validators import email as validate_email + +try: + from unittest import mock +except ImportError: + import mock class TestInternetProvider(unittest.TestCase): diff --git a/tests/providers/test_isbn.py b/tests/providers/test_isbn.py index fe01c4aa93..14919f455f 100644 --- a/tests/providers/test_isbn.py +++ b/tests/providers/test_isbn.py @@ -1,8 +1,10 @@ import unittest -from faker.providers.isbn.en_US import Provider as ISBNProvider + +import pytest + from faker.providers.isbn import ISBN10, ISBN13 +from faker.providers.isbn.en_US import Provider as ISBNProvider from faker.providers.isbn.rules import RegistrantRule -import pytest class TestISBN10(unittest.TestCase): diff --git a/tests/providers/test_misc.py b/tests/providers/test_misc.py index 09d11c7fce..83a8560ac7 100644 --- a/tests/providers/test_misc.py +++ b/tests/providers/test_misc.py @@ -1,6 +1,7 @@ # coding=utf-8 from __future__ import unicode_literals + import csv import io import itertools @@ -8,15 +9,16 @@ import unittest import uuid import zipfile + import six +from faker import Faker + try: from unittest.mock import patch except ImportError: from mock import patch -from faker import Faker - class TestMisc(unittest.TestCase): """Tests miscellaneous generators""" diff --git a/tests/providers/test_person.py b/tests/providers/test_person.py index 58d0720a1b..89eb73b100 100644 --- a/tests/providers/test_person.py +++ b/tests/providers/test_person.py @@ -2,29 +2,29 @@ from __future__ import unicode_literals +import datetime import re import unittest -import datetime -import six -try: - from unittest import mock -except ImportError: - import mock +import six from faker import Faker from faker.providers.person.ar_AA import Provider as ArProvider +from faker.providers.person.cs_CZ import Provider as CsCZProvider from faker.providers.person.fi_FI import Provider as FiProvider from faker.providers.person.hy_AM import Provider as HyAmProvider from faker.providers.person.ne_NP import Provider as NeProvider -from faker.providers.person.sv_SE import Provider as SvSEProvider -from faker.providers.person.cs_CZ import Provider as CsCZProvider from faker.providers.person.pl_PL import Provider as PlPLProvider -from faker.providers.person.pl_PL import ( - checksum_identity_card_number as pl_checksum_identity_card_number) +from faker.providers.person.pl_PL import checksum_identity_card_number as pl_checksum_identity_card_number +from faker.providers.person.sv_SE import Provider as SvSEProvider +from faker.providers.person.ta_IN import Provider as TaINProvider from faker.providers.person.zh_CN import Provider as ZhCNProvider from faker.providers.person.zh_TW import Provider as ZhTWProvider -from faker.providers.person.ta_IN import Provider as TaINProvider + +try: + from unittest import mock +except ImportError: + import mock class TestAr(unittest.TestCase): diff --git a/tests/providers/test_python.py b/tests/providers/test_python.py index 07874ff839..e2ea2b82da 100644 --- a/tests/providers/test_python.py +++ b/tests/providers/test_python.py @@ -1,13 +1,14 @@ # -*- coding: utf-8 -*- import unittest + +from faker import Faker + try: from unittest.mock import patch except ImportError: from mock import patch -from faker import Faker - class TestPyint(unittest.TestCase): def setUp(self): diff --git a/tests/providers/test_ssn.py b/tests/providers/test_ssn.py index f6f13b736c..10dae2cd00 100644 --- a/tests/providers/test_ssn.py +++ b/tests/providers/test_ssn.py @@ -4,24 +4,29 @@ import re import unittest + from datetime import datetime from itertools import cycle import freezegun import pytest import random2 -from validators.i18n.es import es_cif as is_cif, es_nif as is_nif, es_nie as is_nie from faker import Faker from faker.providers.ssn.en_CA import checksum as ca_checksum +from faker.providers.ssn.es_MX import curp_checksum as mx_curp_checksum +from faker.providers.ssn.es_MX import ssn_checksum as mx_ssn_checksum from faker.providers.ssn.et_EE import checksum as et_checksum from faker.providers.ssn.fi_FI import Provider as fi_Provider from faker.providers.ssn.hr_HR import checksum as hr_checksum -from faker.providers.ssn.no_NO import checksum as no_checksum, Provider as no_Provider -from faker.providers.ssn.pl_PL import checksum as pl_checksum, calculate_month as pl_calculate_mouth +from faker.providers.ssn.no_NO import Provider as no_Provider +from faker.providers.ssn.no_NO import checksum as no_checksum +from faker.providers.ssn.pl_PL import calculate_month as pl_calculate_mouth +from faker.providers.ssn.pl_PL import checksum as pl_checksum from faker.providers.ssn.pt_BR import checksum as pt_checksum -from faker.providers.ssn.es_MX import (ssn_checksum as mx_ssn_checksum, - curp_checksum as mx_curp_checksum) +from validators.i18n.es import es_cif as is_cif +from validators.i18n.es import es_nie as is_nie +from validators.i18n.es import es_nif as is_nif class TestSvSE(unittest.TestCase): diff --git a/tests/providers/test_user_agent.py b/tests/providers/test_user_agent.py index 63a4859587..48bf723ea1 100644 --- a/tests/providers/test_user_agent.py +++ b/tests/providers/test_user_agent.py @@ -2,8 +2,8 @@ from __future__ import unicode_literals -import unittest import re +import unittest from faker import Faker from faker.providers.user_agent import Provider as UaProvider diff --git a/tests/test_factory.py b/tests/test_factory.py index 0bac8999f8..92c09cc754 100644 --- a/tests/test_factory.py +++ b/tests/test_factory.py @@ -6,22 +6,24 @@ import string import sys import unittest -try: - from unittest.mock import patch, PropertyMock -except ImportError: - from mock import patch, PropertyMock from collections import OrderedDict from ipaddress import ip_address, ip_network -import pytest import six +import pytest + from faker import Faker, Generator from faker.factory import Factory from faker.generator import random from faker.utils import decorators, text +try: + from unittest.mock import patch, PropertyMock +except ImportError: + from mock import patch, PropertyMock + class BarProvider(object): diff --git a/tests/test_proxy.py b/tests/test_proxy.py index 84c269f439..e1e7b7e3fa 100644 --- a/tests/test_proxy.py +++ b/tests/test_proxy.py @@ -2,17 +2,19 @@ from __future__ import unicode_literals -from collections import OrderedDict import unittest -try: - from unittest.mock import patch, PropertyMock -except ImportError: - from mock import patch, PropertyMock + +from collections import OrderedDict from faker import Faker from faker.config import DEFAULT_LOCALE from faker.generator import Generator +try: + from unittest.mock import patch, PropertyMock +except ImportError: + from mock import patch, PropertyMock + class TestFakerProxyClass(unittest.TestCase): diff --git a/tox.ini b/tox.ini index 912687aab0..ac50f4723f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py{27,35,36,37,38,py,py3},32bit,flake8,checkmanifest +envlist=py{27,35,36,37,38,py,py3},32bit,flake8,checkmanifest,isort skip_missing_interpreters = true [testenv] @@ -24,6 +24,12 @@ deps = commands = check-manifest +[testenv:isort] +deps = + isort +commands = + {envpython} -m isort --check-only --diff + [testenv:32bit] basepython = python passenv = TEST_32BIT