Skip to content

Commit c6c2dcb

Browse files
committed
Update notion.py and error.py. Fix Doctrings
1 parent 6cb3b4d commit c6c2dcb

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/arguments/error.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ def evoke_search_error(self, error_statement):
2121

2222
class LoginError():
2323
def __init__(self, error_statement, success=False):
24-
"""Implements error printing for User Login
24+
"""
25+
Implements error printing for User Login
2526
26-
Error statement is printed in 'Green' or 'Red'
27-
Color depending upon the value of success variable
27+
:error_statement: Error statement to print
28+
:success: Indicates success of login attempt
29+
Prints in green if True else red
2830
"""
2931
self.error_statement = error_statement
3032
self.success = success

src/arguments/notion.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def get_token_from_file():
2626
return data
2727

2828
def get_cookies_from_login():
29-
"""Capture browser cookies for authentication
29+
"""
30+
Capture browser cookies for authentication
3031
3132
Provides the user browser window to login to Notion
3233
Returns the user's cookies which can be used to
@@ -47,7 +48,6 @@ def get_cookies_from_login():
4748
class NotionClient():
4849

4950
"""
50-
5151
Implements Login and token retrieval
5252
5353
Handles the entire procedure of connecting to User's Notion account,
@@ -57,8 +57,9 @@ class NotionClient():
5757
def __init__(self):
5858
"""
5959
No input parameters required for instatiating object.
60-
tokenv2_cookie stores the cookie containing user's tokenv2
61-
tokenv2_key is used to create environment variable
60+
61+
:tokenv2_cookie: stores the cookie containing user's tokenv2
62+
:tokenv2_key: used to create environment variable
6263
"""
6364
self.tokenv2_cookie = None
6465
self.tokenv2_key = 'TOKENV2'

0 commit comments

Comments
 (0)