Skip to content

Commit

Permalink
Run isort as part of CI (#1097)
Browse files Browse the repository at this point in the history
* Run isort as part of CI

isort was already configured in commit
93c9375. 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.
  • Loading branch information
jdufresne authored and fcurella committed Jan 6, 2020
1 parent f120726 commit 72ac5a1
Show file tree
Hide file tree
Showing 321 changed files with 448 additions and 106 deletions.
6 changes: 2 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion faker/__init__.py
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion faker/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
1 change: 1 addition & 0 deletions faker/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import random as random_module
import re

import six

_re_token = re.compile(r'\{\{(\s?)(\w+)(\s?)\}\}')
Expand Down
3 changes: 1 addition & 2 deletions faker/providers/address/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/cs_CZ/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/de/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/de_AT/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from ..de import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/de_DE/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from ..de import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/en/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
2 changes: 2 additions & 0 deletions faker/providers/address/en_CA/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import unicode_literals

import re

from ..en import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/en_GB/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import unicode_literals

from collections import OrderedDict

from ..en import Provider as AddressProvider
Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/en_NZ/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from ..en import Provider as AddressProvider


Expand Down
2 changes: 2 additions & 0 deletions faker/providers/address/en_PH/__init__.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/en_US/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from __future__ import unicode_literals

from collections import OrderedDict

from ..en import Provider as AddressProvider
Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/es/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/es_ES/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from ..es import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/es_MX/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- encoding: utf-8 -*-
from __future__ import unicode_literals

from collections import OrderedDict

from ..es import Provider as AddressProvider
Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/fa_IR/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/fi_FI/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/fr_CH/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/fr_FR/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/hi_IN/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/hr_HR/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/hu_HU/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from collections import OrderedDict

from .. import Provider as AddressProvider
Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/hy_AM/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/id_ID/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/it_IT/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/ko_KR/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/nl_BE/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/nl_NL/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/pl_PL/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/pt_BR/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/pt_PT/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/ru_RU/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/sk_SK/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/sl_SI/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/sv_SE/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/ta_IN/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/zh_CN/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/address/zh_TW/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AddressProvider


Expand Down
6 changes: 4 additions & 2 deletions faker/providers/automotive/__init__.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
1 change: 1 addition & 0 deletions faker/providers/automotive/ar_JO/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AutomotiveProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/automotive/ar_PS/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AutomotiveProvider


Expand Down
4 changes: 3 additions & 1 deletion faker/providers/automotive/de_DE/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@


from __future__ import unicode_literals
from .. import Provider as AutomotiveProvider

import string

from .. import Provider as AutomotiveProvider


class Provider(AutomotiveProvider):

Expand Down
1 change: 1 addition & 0 deletions faker/providers/automotive/en_CA/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AutomotiveProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/automotive/en_GB/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AutomotiveProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/automotive/en_NZ/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# coding=utf-8
from __future__ import unicode_literals

from .. import Provider as AutomotiveProvider


Expand Down
2 changes: 2 additions & 0 deletions faker/providers/automotive/en_PH/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# coding=utf-8
from __future__ import unicode_literals

from string import ascii_uppercase

from ... import BaseProvider


Expand Down
1 change: 1 addition & 0 deletions faker/providers/automotive/en_US/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from __future__ import unicode_literals

from .. import Provider as AutomotiveProvider


Expand Down
Loading

0 comments on commit 72ac5a1

Please sign in to comment.