Skip to content
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

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

Open
luffah opened this issue Apr 19, 2021 · 0 comments
Open

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

luffah opened this issue Apr 19, 2021 · 0 comments

Comments

@luffah
Copy link

luffah commented Apr 19, 2021

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        '
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

No branches or pull requests

1 participant