ikamensh / flynt

A tool to automatically convert old string literal formatting to f-strings
MIT License
685 stars 33 forks source link

remove the unwanted extra newline added by sys.stdin #168

Closed PiRK closed 1 year ago

PiRK commented 1 year ago

When running flynt on stdin, there is an extra newline added to the input, which ends up in the output.

To reproduce the issue, run this before and after this commit (after writing some dummy code to in.py):

cat in.py  | flynt - > out.py
diff in.py out.py

The only diff should be the converted f-strings.

PiRK commented 1 year ago

I believe the fix to the pre-commit issue is https://github.com/ikamensh/flynt/pull/164/commits/b2e9d95541ef4a00d379c399b79897ec42fd0040

The issue should go away if this is rebased onto that commit.

ikamensh commented 1 year ago

I believe the fix to the pre-commit issue is b2e9d95

The issue should go away if this is rebased onto that commit.

Could you please rebase

PiRK commented 1 year ago

Could you please rebase

Done