summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygerrit/__init__.py6
-rw-r--r--pygerrit/client.py2
-rw-r--r--pygerrit/ssh.py7
3 files changed, 10 insertions, 5 deletions
diff --git a/pygerrit/__init__.py b/pygerrit/__init__.py
index 93e6412..5fa98be 100644
--- a/pygerrit/__init__.py
+++ b/pygerrit/__init__.py
@@ -40,9 +40,9 @@ def from_json(json_data, key):
def escape_string(string):
""" Escape a string for use in Gerrit commands.
- Adds necessary escapes and surrounding double quotes to a
- string so that it can be passed to any of the Gerrit commands
- that require double-quoted strings.
+ Return the string with necessary escapes and surrounding double quotes
+ so that it can be passed to any of the Gerrit commands that require
+ double-quoted strings.
"""
diff --git a/pygerrit/client.py b/pygerrit/client.py
index 95f4ce0..9f34ef8 100644
--- a/pygerrit/client.py
+++ b/pygerrit/client.py
@@ -46,7 +46,7 @@ class GerritClient(object):
self._ssh_client = GerritSSHClient(host)
def gerrit_version(self):
- """ Get the version of Gerrit that is connected to. """
+ """ Return the version of Gerrit that is connected to. """
return self._ssh_client.get_remote_version()
def query(self, term):
diff --git a/pygerrit/ssh.py b/pygerrit/ssh.py
index 270a63f..0436165 100644
--- a/pygerrit/ssh.py
+++ b/pygerrit/ssh.py
@@ -35,7 +35,12 @@ from paramiko.ssh_exception import SSHException
def _extract_version(version_string, pattern):
- """ Extract the version from `version_string` using `pattern`. """
+ """ Extract the version from `version_string` using `pattern`.
+
+ Return the version as a string, with leading/trailing whitespace
+ stripped.
+
+ """
if version_string:
match = pattern.match(version_string.strip())
if match: