diff options
author | Timothy Edmund Crosley <timothy.crosley@gmail.com> | 2017-04-03 18:34:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-03 18:34:19 -0700 |
commit | a69b6d8e29f25d5d41d40725bda38b1188e36be2 (patch) | |
tree | 9b12499053f2f1f455b96b816a73f6aef64a9ed7 | |
parent | a6200b8e040d0f9fed2c439bd7eac126e826a0bb (diff) | |
parent | 3d61a57cbac1c22b2d634db08ee35a47941c26f2 (diff) | |
download | isort-a69b6d8e29f25d5d41d40725bda38b1188e36be2.tar.gz |
Merge pull request #490 from njharman/develop
Support Configuration in tox.ini
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | isort/settings.py | 1 |
2 files changed, 3 insertions, 2 deletions
@@ -235,9 +235,9 @@ To configure isort for a single user create a ``~/.isort.cfg`` file: default_section=FIRSTPARTY Additionally, you can specify project level configuration simply by placing a ``.isort.cfg`` file at the root of your -project. isort will look up to 25 directories up, from the the file it is ran against, to find a project specific configuration. +project. isort will look up to 25 directories up, from the file it is ran against, to find a project specific configuration. -Or, if you prefer, you can add an isort section to your project's ``setup.cfg`` with any desired settings. +Or, if you prefer, you can add an isort section to your project's ``setup.cfg`` or ``tox.ini`` file with any desired settings. You can then override any of these settings by using command line arguments, or by passing in override values to the SortImports class. diff --git a/isort/settings.py b/isort/settings.py index 86f9a6b8..073f1a7d 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -115,6 +115,7 @@ def from_path(path): _update_settings_with_config(path, '.editorconfig', '~/.editorconfig', ('*', '*.py', '**.py'), computed_settings) _update_settings_with_config(path, '.isort.cfg', '~/.isort.cfg', ('settings', 'isort'), computed_settings) _update_settings_with_config(path, 'setup.cfg', None, ('isort', ), computed_settings) + _update_settings_with_config(path, 'tox.ini', None, ('isort', ), computed_settings) return computed_settings |