-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement stdin-stdout operation with '-' file argument #119
Conversation
I have pylint checks failing locally, but for files I haven't changed. |
This comment was marked as resolved.
This comment was marked as resolved.
bf16dfe
to
150c6e3
Compare
@@ -56,20 +58,29 @@ def main(): | |||
for path in find_python_files(args.files): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth adding something to find_python_files
to prevent it from searching directories named '-'
.
I think I agree that it makes sense to allow mixing '-'
with other arguments.
Looks good. I recon fix
Lol. |
Pull Request Test Coverage Report for Build 11673472686Details
💛 - Coveralls |
Yup. Not your fault. |
Write stdin to stdout in cases of error and no-change
b8eda54
to
39593a8
Compare
Thank you very much. I've pushed v0.14.0 to pypi with this change. |
This works well in my casual testing, and can even be used in combination with regular file arguments.
But I haven't written a formal test for it yet, so I'm marking this as a draft.It makes sure to write the stdin to stdout if there's a problem formatting/encoding/decoding, and if no formatting is necessary. This ensures it doesn't delete content when used as one step in a pipeline of successive formatters and linters.