Skip to content

Commit

Permalink
Show filenames with errors in --check mode (#57)
Browse files Browse the repository at this point in the history
* Show filenames with errors in --check mode

* Shorten line
  • Loading branch information
arxell authored and myint committed Aug 24, 2019
1 parent 0c06363 commit 3d81736
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion autoflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,9 @@ def fix_file(filename, args, standard_out):

if original_source != filtered_source:
if args.check:
standard_out.write('Unused imports/variables detected.')
standard_out.write(
'{filename}: Unused imports/variables detected'.format(
filename=filename))
sys.exit(1)
if args.in_place:
with open_with_encoding(filename, mode='w',
Expand Down

0 comments on commit 3d81736

Please sign in to comment.