facebook/usort

Support for --stdout and -

Compro-Prasad opened this issue ยท 2 comments

isort uses --stdout argument to write sorted imports to the stdout and also uses - argument to read from stdin.

usort doesn't support this behavior because of which I am unable to auto format in Emacs buffers.

isort behavior

$ isort --stdout -
import sys
import os
sys.stdout.write(os.getcwd() + "\n")
import os
import sys

sys.stdout.write(os.getcwd() + "\n")

usort behavior

$ usort --stdout -
Usage: usort [OPTIONS] COMMAND [ARGS]...
Try 'usort --help' for help.

Error: no such option: --stdout

Try usort format -

Thanks. It worked.