Skip to content

Commit

Permalink
versionadded/changed for SSHConfigDict et al
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jun 14, 2018
1 parent 455ff2a commit 39a3acd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions paramiko/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ def lookup(self, hostname):
assert conf.as_bool('passwordauthentication') is True
:param str hostname: the hostname to lookup
.. versionchanged:: 2.5
Returns `SSHConfigDict` objects instead of dict literals.
"""
matches = [
config
Expand Down Expand Up @@ -330,6 +333,8 @@ class SSHConfigDict(dict):
assert conf.as_bool('compression') is True
assert conf['serveraliveinterval'] == '60'
assert conf.as_int('serveraliveinterval') == 60
.. versionadded:: 2.5
"""

def __init__(self, *args, **kwargs):
Expand All @@ -347,6 +352,8 @@ def as_bool(self, key):
.. note::
If (for whatever reason) the stored value is already boolean in
nature, it's simply returned.
.. versionadded:: 2.5
"""
val = self[key]
if isinstance(val, bool):
Expand All @@ -359,5 +366,7 @@ def as_int(self, key):
This method will raise ``ValueError`` or similar if the value is not
int-appropriate, same as the builtin `int` type.
.. versionadded:: 2.5
"""
return int(self[key])

0 comments on commit 39a3acd

Please sign in to comment.