Skip to content

fix: correct ProjectFile.decode() documentation #1405

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

Merged
merged 1 commit into from
Apr 23, 2021
Merged

fix: correct ProjectFile.decode() documentation #1405

merged 1 commit into from
Apr 23, 2021

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Apr 23, 2021

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 to
base64.b64decode()

The docs for that function state it returns 'bytes':
https://docs.python.org/3/library/base64.html#base64.b64decode

Fixes: #1403

@JohnVillalovos JohnVillalovos changed the title Correct ProjectFile.decode() documentation fix: correct ProjectFile.decode() documentation Apr 23, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #1405 (5dc4461) into master (711896f) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 5dc4461 differs from pull request most recent head aae000d. Consider uploading reports for the commit aae000d to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1405   +/-   ##
=======================================
  Coverage   80.22%   80.22%           
=======================================
  Files          73       73           
  Lines        4071     4071           
=======================================
  Hits         3266     3266           
  Misses        805      805           
Flag Coverage Δ
unit 80.22% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/v4/objects/files.py 50.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 711896f...aae000d. Read the comment docs.

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 to
base64.b64decode()

The docs for that function state it returns 'bytes':
https://docs.python.org/3/library/base64.html#base64.b64decode

Fixes: #1403
@max-wittig
Copy link
Member

Thanks 👍

@max-wittig max-wittig merged commit c055de0 into python-gitlab:master Apr 23, 2021
@JohnVillalovos JohnVillalovos deleted the jlvillal/returns_bytes branch April 23, 2021 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong return type in ProjectFile.decode()
3 participants