Skip to content

A fast pass on docstring or code would be nice :p #66

@luffah

Description

@luffah

Hello, sorry to just reveal the thing and not proposing a PR.
Actually, it would be easy to fix (but shall require a code review).

Below the function get_share_info have a docstring that is incoherent with working usecase.

>>> nxc.get_share_info(8).data
Traceback (most recent call last):
  File "/usr/lib/python3.6/code.py", line 91, in runcode
    exec(code, self.locals)
  File "<console>", line 1, in <module>
  File "~/r_et_d/nextcloud/api_wrappers/share.py", line 73, in get_share_info
    return self.requester.get(self.get_local_url(sid))
  File "~/r_et_d/nextcloud/api_wrappers/share.py", line 12, in get_local_url
    return "/".join([self.LOCAL, additional_url])
TypeError: sequence item 1: expected str instance, int found
>>> nxc.get_share_info('8').data
[{'id': 8, ... }]
>>> nxc.get_share_info.__doc__
'\n        Get information about a given share\n\n        Args:\n            sid (int): share id\n\n        Returns:\n        '

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions