Open misho104 opened 5 years ago
Thanks! To preserve backward compatibility, let's make an option to print out the whole file. Leave the current behavior as the default. Note that the diff-by-default behavior matches some other other tools (autoflake
, unify
, etc.).
Also, I don't think it should allow printing out the whole file if there are multiple files being checked. This would risk someone accidentally concatenating multiple files into a single file.
Fair enough, and i agree on it! I'll try to do such when I have spare time.
The current behavior of
pyformat
is different fromautopep8
, which returns diff only when --diff option is specified and otherwise returns the whole file content. It would be nice if the behavior ofpyformat
, which currently returns diff always, could be the same as autopep8, because then users can usepyformat
just by replacing theirautopep8
topyformat
.For example, this issue of vscode is solved and vscode users can use
pyformat
with a simple modification of their configuration.