Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb180baf

Browse files
fix: correct ProjectFile.decode() documentation
ProjectFile.decode() returns 'bytes' and not 'str'.Update the method's doc-string and add a type-hint.ProjectFile.decode() returns the result of a call tobase64.b64decode()The docs for that function state it returns 'bytes':https://docs.python.org/3/library/base64.html#base64.b64decodeFixes:#1403
1 parent711896f commitb180baf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎gitlab/v4/objects/files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ class ProjectFile(SaveMixin, ObjectDeleteMixin, RESTObject):
2222
_id_attr="file_path"
2323
_short_print_attr="file_path"
2424

25-
defdecode(self):
25+
defdecode(self)->bytes:
2626
"""Returns the decoded content of the file.
2727
2828
Returns:
29-
(str): the decoded content.
29+
(bytes): the decoded content.
3030
"""
3131
returnbase64.b64decode(self.content)
3232

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp