Skip to content

Commit

Permalink
Switch to using just verbose flag
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycrosley committed May 15, 2014
1 parent 7fc780c commit 76f3407
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion isort/isort.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(self, file_path=None, file_contents=None, write_to_stdout=False, ch
return
if check:
if self.output == file_contents:
if not self.config['errors_only']:
if self.config['verbose']:
print("SUCCESS: {0} Everything Looks Good!".format(self.file_path))
else:
print("ERROR: {0} Imports are incorrectly sorted.".format(self.file_path))
Expand Down
4 changes: 1 addition & 3 deletions isort/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ def main():
help="Ensures that if a star import is present, nothing else is imported from that namespace.")
parser.add_argument('-v', '--version', action='version', version='isort {0}'.format(__version__))
parser.add_argument('-vb', '--verbose', action='store_true', dest="verbose",
help='Shows verbose output, including when files are skipped.')
parser.add_argument('-eo', '--errors-only', action='store_true', dest="errors_only",
help='Only produce output for errors.')
help='Shows verbose output, such as when files are skipped or when a check is successful.')

arguments = dict((key, value) for (key, value) in itemsview(vars(parser.parse_args())) if value)
file_names = arguments.pop('files', [])
Expand Down
3 changes: 1 addition & 2 deletions isort/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
'lines_after_imports': -1,
'combine_as_imports': False,
'combine_star': False,
'verbose': False,
'errors_only': False}
'verbose': False}


@lru_cache()
Expand Down

0 comments on commit 76f3407

Please sign in to comment.