feat(files): allow decoding project files directly to string by nejch · Pull Request #2396 · python-gitlab/python-gitlab
Repository navigation
feat(files): allow decoding project files directly to string - #2396
Open
nejch wants to merge 1 commit into main from feat/decode-to-string
Open
feat(files): allow decoding project files directly to string #2396 nejch wants to merge 1 commit into main from feat/decode-to-string
Conversation
nejch commented Nov 26, 2022
Copy link Copy Markdown
Member
Provides a slightly less clunky interface so people don't need to do f.decode.().decode("utf-8") in user code.
feat(files): allow decoding project files directly to string
8751402
nejch
mentioned this pull request
Nov 26, 2022
refactor: use python-gitlab in acceptance tests
gitlabform/gitlabform#442
Merged
codecov-commenter commented Nov 26, 2022
Copy link Copy Markdown
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 commented Nov 27, 2022
Copy link Copy Markdown
|
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 commented Dec 4, 2022 · edited Loading
Copy link Copy Markdown
Member
Author
|
@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 it actually convenient for the user ;) I agree Edit: the |
nejch commented Feb 7, 2023 · edited Loading
Copy link Copy Markdown
Member
Author
|
Maybe an additional |
This branch has not been deployed
No deployments
Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment