You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest (develop) version (tested at 394738e) of isort appears to have regressed the handling of --diff when reading from standard input (originally fixed by #384 in the 4.x series).
--diff support with stdin is important to allow editor integrations to use isort on modified files and unsaved buffers as otherwise the editor would need to duplicate isort's locating of configuration files.
$ cat demo.py
import os, sys, collections
$ isort --diff - < demo.py
Traceback (most recent call last):
File "/home/peter/.virtualenvs/isort/bin/isort", line 11, in <module>
load_entry_point('isort', 'console_scripts', 'isort')()
File "/home/play/isort/isort/main.py", line 600, in main
**arguments,
File "/home/play/isort/isort/api.py", line 104, in sorted_imports
config = _config(path=file_path, config=config, **config_kwargs)
File "/home/play/isort/isort/api.py", line 47, in _config
config = Config(**config_kwargs)
File "/home/play/isort/isort/settings.py", line 300, in __init__
super().__init__(sources=tuple(sources), **combined_config) # type: ignore
TypeError: __init__() got an unexpected keyword argument 'show_diff'
Perhaps surprisingly --diff works fine when given actual filenames:
The latest (
develop
) version (tested at 394738e) ofisort
appears to have regressed the handling of--diff
when reading from standard input (originally fixed by #384 in the 4.x series).--diff
support with stdin is important to allow editor integrations to useisort
on modified files and unsaved buffers as otherwise the editor would need to duplicateisort
's locating of configuration files.Perhaps surprisingly
--diff
works fine when given actual filenames:The text was updated successfully, but these errors were encountered: