@@ -86,7 +86,6 @@ def _execute(self, args) -> None:
8686 raise Exception (self .data ['errors' ][0 ]['message' ])
8787 self .data = QueryResult .from_dict (self .data ['data' ])
8888 self .show ()
89- self .recent_submissions ()
9089 except Exception as e :
9190 console .print (f"{ e .__class__ .__name__ } : { e } " , style = ALERT )
9291
@@ -102,7 +101,7 @@ def show_stats(self) -> None:
102101 for submission in subm :
103102 submit_counts .append (submission .count )
104103
105- table = LeetTable (title = self .username + " 's Leetcode Stats" )
104+ table = LeetTable (title = f" { self .username } 's Leetcode Stats" )
106105 table .add_column ('Difficulty' )
107106 table .add_column ('Question Count' )
108107 table .add_column ('Beaten Stats (%)' )
@@ -180,8 +179,8 @@ def __parse_args(self, args):
180179 if getattr (args , 'username' ):
181180 self .params ['username' ] = getattr (args , 'username' )
182181 else :
183- username = self .config .user_config .get ('username' )
184- if username :
182+ self . username = self .config .user_config .get ('username' )
183+ if self . username :
185184 self .params ['username' ] = self .config .user_config .get ('username' )
186185 else :
187186 console .print ("Username neither provided nor configured. Head to --help." , style = ALERT )
@@ -222,10 +221,10 @@ def params(self, params: Dict) -> None:
222221 self ._params = params
223222 self .data_fetched = False
224223
225- if __name__ == '__main__' :
226- stats = UserProblemsSolved ()
227- stats .fetch_data ('skygragon' )
228- stats .show ()
224+ # if __name__ == '__main__':
225+ # stats = UserProblemsSolved()
226+ # stats.fetch_data('skygragon')
227+ # stats.show()
229228
230- stats .fetch_data ('coderbeep' )
231- stats .show ()
229+ # stats.fetch_data('coderbeep')
230+ # stats.show()
0 commit comments