From 4ca90c84b207f68e49eac9498ef3eb15215b7d9a Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 27 Sep 2022 23:06:57 +0530 Subject: Remove empty first line in docstrings. * wqflask/utility/monads.py (MonadicDict, MonadicDictCursor): Remove empty first line in docstrings. --- wqflask/utility/monads.py | 15 +++++---------- 1 file 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. -- cgit v1.2.3