Hi! I apologize if this has been answered elsewhere, but I don't see any existing documentation on this point (https://github.com/PyCQA/isort/issues/156 is the closest I found).
I'm currently building a tool that will call the isort.check_file() API, but I don't want to emit the lines like
ERROR: /tmp/test.py Imports are incorrectly sorted and/or formatted.
Is there a config option I'm missing somewhere? If not, what options do I have? I've considered monkey-patching create_terminal_printer() and monkey-patching sys.stderr, but neither seem like long-term solutions :)
I'd also love to have this option. I tried just setting the format_error setting to the empty string, but then it prints a blank line for every file being checked.
Hi! I apologize if this has been answered elsewhere, but I don't see any existing documentation on this point (https://github.com/PyCQA/isort/issues/156 is the closest I found).
I'm currently building a tool that will call the
isort.check_file()
API, but I don't want to emit the lines likeLooking at the code, it doesn't look like this is currently possible, as we just unconditionally create a "terminal printer" and then unconditionally call
.error()
on it: https://github.com/PyCQA/isort/blob/44e3b5d179da5033ce23f796b014e74f3a3259cd/isort/api.py#L272-L275 https://github.com/PyCQA/isort/blob/44e3b5d179da5033ce23f796b014e74f3a3259cd/isort/api.py#L280which ultimately unconditionally calls
print()
: https://github.com/PyCQA/isort/blob/44e3b5d179da5033ce23f796b014e74f3a3259cd/isort/format.py#L107Is there a config option I'm missing somewhere? If not, what options do I have? I've considered monkey-patching
create_terminal_printer()
and monkey-patchingsys.stderr
, but neither seem like long-term solutions :)