diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | isort/settings.py | 8 | ||||
-rwxr-xr-x | setup.py | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 358e1600..6a5cba78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ Changelog ### 4.3.16 - March 23, 2019 - hot fix release - Fixed issue #909 - skip and skip-glob are not enforced when using settings-path. +- Fixed issue #907 - appdirs optional requirement does not correctly specify version +- Fixed issue #902 - Too broad warning about missing toml package - Fixed issue #778 - remove `user` from known standard library as it's no longer in any supported Python version. ### 4.3.15 - March 10, 2019 - hot fix release diff --git a/isort/settings.py b/isort/settings.py index fca84678..bdadc711 100644 --- a/isort/settings.py +++ b/isort/settings.py @@ -289,10 +289,10 @@ def _get_config_data(file_path, sections): config_section = config_section.get(key, {}) settings.update(config_section) else: - warnings.warn( - "Found %s but toml package is not installed. To configure " - "isort with %s, install with 'isort[pyproject]'." % (file_path, file_path) - ) + if '[tool.isort]' in config_file.read(): + warnings.warn("Found {} with [tool.isort] section, but toml package is not installed. " + "To configure isort with {}, install with 'isort[pyproject]'.".format(file_path, + file_path)) else: if file_path.endswith('.editorconfig'): line = '\n' @@ -25,7 +25,7 @@ setup(name='isort', 'pipfile': ['pipreqs', 'requirementslib'], 'pyproject': ['toml'], 'requirements': ['pip', 'pipreqs'], - 'xdg_home': ['appdirs'], + 'xdg_home': ['appdirs>=1.4.0'], }, install_requires=[ 'futures; python_version < "3.2"', |