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

fix docstring typo; set default #28

Merged
merged 1 commit into from
Mar 31, 2015
Merged

Conversation

nchammas
Copy link
Contributor

Fixed a minor typo and set the timeout parameter default to match what was in the doc string.

@@ -96,7 +96,7 @@ def __init__(self, host,
:param num_retries: (Optional) Number of retries for connection attempts\
before the client gives up. Defaults to 3.
:type num_retries: int
:param timeout: (Optional) Number of seconds to timout connection attempts\
:param timeout: (Optional) Number of seconds to timeout connection attempts\
before the client gives up. Defaults to 10.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a placeholder we can specify here that autofills the default value when docs are generated? Like a :default: or something. That would be better than having to update the default value both in the method signature and in the docstring when/if it changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid not.

Best there is is autoattribute for class attributes but it doesn't work for function keyword arguments.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.04%) to 69.95% when pulling 2896d8a on nchammas:patch-1 into 90c6812 on pkittenis:master.

@pkittenis
Copy link
Member

Thanks, looks good.

The timeout's default value is actually OS dependent - 10 on my system but better to have it explicit.

pkittenis added a commit that referenced this pull request Mar 31, 2015
Fixed docstring typo - set default timeout value explicitly.
@pkittenis pkittenis merged commit 8163acc into ParallelSSH:master Mar 31, 2015
@nchammas nchammas deleted the patch-1 branch March 31, 2015 14:33
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.

None yet

3 participants