aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-09-27 23:06:57 +0530
committerArun Isaac2022-09-29 16:15:47 +0530
commit4ca90c84b207f68e49eac9498ef3eb15215b7d9a (patch)
tree68fe08503fbb824b3b4ef4a0690b145e8c4781e1
parent318b86a1e02e39030c0a0e35eb1cd97d427e34d5 (diff)
downloadgenenetwork2-4ca90c84b207f68e49eac9498ef3eb15215b7d9a.tar.gz
Remove empty first line in docstrings.
* wqflask/utility/monads.py (MonadicDict, MonadicDictCursor): Remove empty first line in docstrings.
-rw-r--r--wqflask/utility/monads.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/wqflask/utility/monads.py b/wqflask/utility/monads.py
index e42a60f2..3360fad2 100644
--- a/wqflask/utility/monads.py
+++ b/wqflask/utility/monads.py
@@ -66,8 +66,7 @@ class MonadicDict(UserDict):
{}
"""
def __init__(self, d={}, convert=True):
- """
- Initialize monadic dictionary.
+ """Initialize monadic dictionary.
If convert is False, values in dictionary d must be
monadic. If convert is True, values in dictionary d are
@@ -79,8 +78,7 @@ class MonadicDict(UserDict):
else:
super().__init__(d)
def __getitem__(self, key):
- """
- Get key from dictionary.
+ """Get key from dictionary.
If key exists in the dictionary, return a Just value. Else,
return Nothing.
@@ -90,8 +88,7 @@ class MonadicDict(UserDict):
except KeyError:
return Nothing
def __setitem__(self, key, value):
- """
- Set key in dictionary.
+ """Set key in dictionary.
value must be a monadic value---either Nothing or a Just
value. If value is a Just value, set it in the dictionary. If
@@ -99,8 +96,7 @@ class MonadicDict(UserDict):
"""
value.bind(partial(super().__setitem__, key))
def __delitem__(self, key):
- """
- Delete key from dictionary.
+ """Delete key from dictionary.
If key exists in the dictionary, delete it. Else, do nothing.
"""
@@ -110,8 +106,7 @@ class MonadicDict(UserDict):
pass
class MonadicDictCursor(DictCursor):
- """
- Monadic version of MySQLdb.cursors.DictCursor.
+ """Monadic version of MySQLdb.cursors.DictCursor.
Monadic version of MySQLdb.cursors.DictCursor that returns a
MonadicDict instead of the built-in dictionary.