diff options
author | Timothy Crosley <timothy.crosley@gmail.com> | 2013-11-14 00:34:00 -0500 |
---|---|---|
committer | Timothy Crosley <timothy.crosley@gmail.com> | 2013-11-14 00:34:00 -0500 |
commit | 988904db93bc8214d0df67a4128cd8221b6a01e2 (patch) | |
tree | 9770e9c41e12b1463ceaa4b05a9ecdd0572a8b1e /scripts | |
parent | 38df986a33a91b0a2624ccaed4bf38dfe6b558dc (diff) | |
download | isort-988904db93bc8214d0df67a4128cd8221b6a01e2.tar.gz |
Support for printing a diff of proposed changes instead of modifying the file
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/isort | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/isort b/scripts/isort index a70b4ddf..8640d99d 100755 --- a/scripts/isort +++ b/scripts/isort @@ -41,6 +41,8 @@ parser.add_argument('-c', '--check-only', action='store_true', default=False, de 'the file.') parser.add_argument('-sd', '--section-default', dest='default_section', help='Sets the default section for imports (by default FIRSTPARTY) options: ' + str(SECTION_NAMES)) +parser.add_argument('-df', '--diff', dest='show_diff', default=False, action='store_true', + help="Prints a diff of all the changes isort would make to a file, instead of changing it in place") parser.add_argument('-v', '--version', action='version', version='isort {0}'.format(__version__)) arguments = dict((key, value) for (key, value) in itemsview(vars(parser.parse_args())) if value) |