Skip to content

Support formatting code provided via stdin #7

@vlcinsky

Description

@vlcinsky

yapf has very similar command line interface as pyformat but provides one additional one: pass a code via stdin and print result on stdout.

Such a feature makes it very easy for integrating e.g. into vim editor by adding following line into .vimrc file:

autocmd FileType python setlocal equalprg=yapf

and user may format the code of whole file:

gg=G

or in visual mode (multiple lines selected):

=

pyformat does not accept file on stdin thus it is not possible to use it in the same style. Adding such feature to pyformat would make use simpler.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions