diff options
author | Emil Melnikov <emilmelnikov@users.noreply.github.com> | 2019-03-06 15:54:51 +0100 |
---|---|---|
committer | Emil Melnikov <emilmelnikov@gmail.com> | 2019-03-06 18:08:17 +0100 |
commit | 30ec3d0b4fa84a985a4226fb92700f8bb36c4f94 (patch) | |
tree | ef0c4e59249ee78920c200cf5bd3ecee8c86de42 /isort | |
parent | 169029f33e9ee9477d266a6a172df3f9b79bff8e (diff) | |
download | isort-30ec3d0b4fa84a985a4226fb92700f8bb36c4f94.tar.gz |
Do not print file names when in the quiet mode
The current help for the `--quiet` option says that it enables "extra
quiet output, only errors are outputted". However, isort still prints
`Fixing spam/eggs.py` messages to stdout.
Diffstat (limited to 'isort')
-rw-r--r-- | isort/isort.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/isort/isort.py b/isort/isort.py index 73363e83..0d8d6f09 100644 --- a/isort/isort.py +++ b/isort/isort.py @@ -212,7 +212,8 @@ class SortImports(object): if answer in ('quit', 'q'): sys.exit(1) with open(self.file_path, 'w', encoding=self.file_encoding, newline='') as output_file: - print("Fixing {0}".format(self.file_path)) + if not self.config['quiet']: + print("Fixing {0}".format(self.file_path)) output_file.write(self.output) @property |