Skip to content

Wrong return type in ProjectFile.decode() #1403

@Nov1kov

Description

@Nov1kov

Description of the problem, including code/CLI snippet

https://python-gitlab.readthedocs.io/en/stable/api/gitlab.v4.html#gitlab.v4.objects.ProjectFile.decode

The method should return the content of a file in "str" type.

Expected Behavior

>> project.files.get(ref='master', file_path='some/path').decode()
>> 'content in file'

Actual Behavior

>> project.files.get(ref='master', file_path='some/path').decode()
>> b"content in file"

Specifications

  • python-gitlab version: 2.6.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 13.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions