Skip to content

Commit

Permalink
Reuse config when items passed in through stdin as used when items pa…
Browse files Browse the repository at this point in the history
…ssed in explicitly. Resloves: #1447
  • Loading branch information
timothycrosley committed Sep 3, 2020
1 parent ba8cf2f commit 0973421
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions isort/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,11 +823,10 @@ def main(argv: Optional[Sequence[str]] = None, stdin: Optional[TextIOWrapper] =
print(json.dumps(config.__dict__, indent=4, separators=(",", ": "), default=_preconvert))
return
elif file_names == ["-"]:
arguments.setdefault("settings_path", os.getcwd())
api.sort_stream(
input_stream=sys.stdin if stdin is None else stdin,
output_stream=sys.stdout,
**arguments,
config=config,
)
else:
skipped: List[str] = []
Expand Down

0 comments on commit 0973421

Please sign in to comment.