pyformat
                                
                                
                                
                                    pyformat copied to clipboard
                            
                            
                            
                        show diff only when --diff
The current behavior of pyformat is different from autopep8, which returns diff only when --diff option is specified and otherwise returns the whole file content.
It would be nice if the behavior of pyformat, which currently returns diff always, could be the same as autopep8, because then users can use pyformat just by replacing their autopep8 to pyformat.
For example, this issue of vscode is solved and vscode users can use pyformat with a simple modification of their configuration.
Coverage remained the same at 100.0% when pulling 5d21b07a8cc3f1a74b5973f2769b1599e1fd4c4a on misho104:diff_option into 7293e4dd46433b56bb9224ce0a19f616a231c0ed on myint:master.
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.