google / yapf

A formatter for Python files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trailing \ stripped when useing yapf by stdin in windows

EeyoreLee opened this issue · comments

Here's a code snippet.

def __setProjAndEnv(self, project: str, env: str):
    with tryBlockSignals(self.__sw.envComboBox, self.__sw.projectComboBox), \
          waitCursor():
        pass

if I use yapf xx.py in windows, it works fine but type xx.py | yapf. I think there's a bug when use stdin and stdout in windows to format code. And also works fine in linux(ubuntu I tested). Same situation for EeyoreLee/vscode-extension-yapf#36