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

Improvements on method documentation #248

Open
Kogelvis opened this issue Aug 2, 2017 · 0 comments
Open

Improvements on method documentation #248

Kogelvis opened this issue Aug 2, 2017 · 0 comments

Comments

@Kogelvis
Copy link

Kogelvis commented Aug 2, 2017

Hi,

I've been using this library for a couple of days now. So far it does exactly what it needs to be doing, thank you for that :)

However I feel the documentation on some methods could be improved.
For example the delete method of the Client class. It mentions it raises "KeyValue: If the key doesn't exists." When I try to write something like:

try:
    client.delete('/key', recursive=True)
except KeyValue as error:
    print(error)

Flake8 will immediately state that 'KeyValue' is an undefined name. If I try etcd.KeyValue instead pylint objects that the module etcd has no KeyValue member.
When I tried the delete method in a python shell I found that it actually raises an etcd.EtcdKeyNotFound exception.

It would be usefull if you could update this and other methods with the actual exception it raises.

Thanks in advance 👍

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