Add ability to write completions to the file#192
Merged
casperdcl merged 2 commits intoiterative:mainfrom Aug 4, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #192 +/- ##
==========================================
+ Coverage 88.88% 88.91% +0.03%
==========================================
Files 3 3
Lines 360 361 +1
==========================================
+ Hits 320 321 +1
Misses 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
Apparently this will be deprecated python/cpython#58032 - might prefer a different implementation. |
Contributor
Author
|
oof, tbh I don't think in context of this tools we would even actually be affected by the mentioned issues, but nevertheless (because of deprecation) I've replaced logic to (optional) Path argument and handle it accordingly (i.e. if empty, then emit sys.stdout and file descriptor otherwise). I've also added few tests to cover new code Please, let me know if you would like to see another solution here |
casperdcl
added a commit
that referenced
this pull request
Aug 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It might be useful to write file directly instead of forwarding output to it, e.g. if files are generated automatically in pipeline (via tox or whatever is used) and distributed together with an application. No append option supported.
This commit also updates docs for cases when it is possible to write file directly and no sudo required to write there