- Notifications
You must be signed in to change notification settings - Fork673
feat(files): allow decoding project files directly to string#2396
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecov-commenter commentedNov 26, 2022
Codecov Report
@@ Coverage Diff @@## main #2396 +/- ##==========================================- Coverage 95.97% 95.92% -0.05%========================================== Files 80 80 Lines 5342 5354 +12 ==========================================+ Hits 5127 5136 +9- Misses 215 218 +3
Flags with carried forward coverage won't be shown.Click here to find out more.
|
gdubicki commentedNov 27, 2022
Hi! Sorry if I am oversharing here, especially as I don't know this project and its conventions well (yet!). While this is definitely an improvement from the previous syntax I feel that this could and maybe should be even simpler. Because people mostly store source code in git then the most popular use-case here will probably be getting the content of the file as So I propose to add a method For bytes I would personally prefer having For completeness I would add PS I've never used |
nejch commentedDec 4, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@gdubicki thanks for the feedback! I'll take another look at what wording makes the most sense, especially when compared to For context, this In most other cases we do not add more higher-level convenience and instead keep it a thin wrapper, so I'd be wary of introducing more methods but if we do already provide some decoding then it probably makes sense to make itactually convenient for the user ;) I agree Edit: the |
nejch commentedFeb 7, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Maybe an additional |
Provides a slightly less clunky interface so people don't need to do
f.decode.().decode("utf-8")
in user code.