diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2019-02-25 02:11:47 -0800 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2019-02-25 02:11:47 -0800 |
commit | bfabca6bd1c178cda98de41149f55933cfe37e65 (patch) | |
tree | 45db999b3c7dd17c0daf804064ff81a5631a189b | |
parent | 234c539c98a9ab6b657563bcbf1f95f649b2a3ac (diff) | |
download | isort-bfabca6bd1c178cda98de41149f55933cfe37e65.tar.gz |
Fix issues with -r command4.3.8
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | isort/__init__.py | 2 | ||||
-rw-r--r-- | isort/main.py | 6 | ||||
-rwxr-xr-x | setup.py | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 43af4f9c..aa9f53c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ Changelog ========= +### 4.3.8 - Feburary 25, 2019 - hot fix release +- Fixed a bug that led to the recursive option not always been available from the command line. + ### 4.3.7 - February 25, 2019 - hot fix release - Expands the finder failsafe to occur on the creation of the finder objects. diff --git a/isort/__init__.py b/isort/__init__.py index 6d148e60..5e33a00a 100644 --- a/isort/__init__.py +++ b/isort/__init__.py @@ -25,4 +25,4 @@ from __future__ import absolute_import, division, print_function, unicode_litera from . import settings # noqa: F401 from .isort import SortImports # noqa: F401 -__version__ = "4.3.7" +__version__ = "4.3.8" diff --git a/isort/main.py b/isort/main.py index 426d05e3..8e38d0e6 100644 --- a/isort/main.py +++ b/isort/main.py @@ -251,6 +251,7 @@ def parse_args(argv=None): help='Force sortImports to recognize a module as being part of the current python project.') parser.add_argument('-q', '--quiet', action='store_true', dest="quiet", help='Shows extra quiet output, only errors are outputted.') + parser.add_argument('-r', dest='ambiguous_r_flag', action='store_true') parser.add_argument('-rm', '--remove-import', dest='remove_imports', action='append', help='Removes the specified import from all files.') parser.add_argument('-rc', '--recursive', dest='recursive', action='store_true', @@ -306,6 +307,11 @@ def main(argv=None): print(INTRO) return + if arguments.get('ambiguous_r_flag'): + print('ERROR: Deprecated -r flag set. This flag has been replaced with -rm to remove ambiguity between it and ' + '-rc for recursive') + sys.exit(1) + if 'settings_path' in arguments: sp = arguments['settings_path'] arguments['settings_path'] = os.path.abspath(sp) if os.path.isdir(sp) else os.path.dirname(os.path.abspath(sp)) @@ -6,7 +6,7 @@ with open('README.rst') as f: readme = f.read() setup(name='isort', - version='4.3.7', + version='4.3.8', description='A Python utility / library to sort Python imports.', long_description=readme, author='Timothy Crosley', |