[tor-commits] [stem/master] Converting stem.util.tor_tools to reStructuredText
atagar at torproject.org
atagar at torproject.org
Wed Jun 6 04:30:17 UTC 2012
commit 12af869b1f669117de736c86f3e094ad2e467be4
Author: Damian Johnson <atagar at torproject.org>
Date: Tue Jun 5 20:08:57 2012 -0700
Converting stem.util.tor_tools to reStructuredText
---
stem/util/tor_tools.py | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/stem/util/tor_tools.py b/stem/util/tor_tools.py
index 3c0e88a..a4f63c3 100644
--- a/stem/util/tor_tools.py
+++ b/stem/util/tor_tools.py
@@ -22,12 +22,10 @@ def is_valid_fingerprint(entry, check_prefix = False):
a '$' prefix if check_prefix is true, otherwise this only validates the hex
digits.
- Arguments:
- entry (str) - string to be checked
- check_prefix (bool) - checks for a '$' prefix
+ :param str entry: string to be checked
+ :param bool check_prefix: checks for a '$' prefix
- Returns:
- True if the string could be a relay fingerprint, False otherwise.
+ :returns: True if the string could be a relay fingerprint, False otherwise.
"""
if check_prefix:
@@ -40,11 +38,9 @@ def is_valid_nickname(entry):
"""
Checks if a string is a valid format for being a nickname.
- Arguments:
- entry (str) - string to be checked
+ :param str entry: string to be checked
- Returns:
- True if the string could be a nickname, False otherwise.
+ :returns: True if the string could be a nickname, False otherwise.
"""
return bool(NICKNAME_PATTERN.match(entry))
More information about the tor-commits
mailing list