Skip to content

Commit f957a58

Browse files
committed
emojis with the submissions
1 parent 0e0c1f0 commit f957a58

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

leetcode/models/graphql_submission_list.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,27 @@ def execute(self, args):
6666
raise ValueError("Apparently you don't have any submissions for this problem.")
6767
self.show()
6868

69-
if self.show_terminal:
70-
self.show_code()
69+
# if self.show_terminal:
70+
# self.show_code()
7171

72-
if self.submission_download:
73-
self.download_submission()
72+
# if self.submission_download:
73+
# self.download_submission()
7474
except Exception as e:
7575
console.print(f"{e.__class__.__name__}: {e}", style=ALERT)
7676

7777
def show(self):
7878
table = LeetTable()
7979
table.add_column('ID')
80-
table.add_column('Title')
81-
table.add_column('Status Display')
80+
# table.add_column('Title')
81+
table.add_column('Status')
8282
table.add_column('Runtime')
8383
table.add_column('Memory')
8484
table.add_column('Language')
8585

8686
submissions = self.result.submissions
87+
table.title = f"Submissions for problem [blue]{submissions[0].title}"
8788
for x in submissions:
88-
table.add_row(x.id, x.title, x.statusDisplay, x.runtime, x.memory, x.langName)
89+
table.add_row(x.id, x.statusDisplay, x.runtime, x.memory, x.langName)
8990
console.print(table)
9091

9192

leetcode/models/graphql_user_problems_solved.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
# TODO: Add the submission ID into the table, so that the user can copy paste that to download the submitted code
7-
# TODO: think about round the time to the nearest
87
@dataclass
98
class DifficultyCount:
109
difficulty: str

leetcode/models/styles.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222

2323
status_retranslate = {'ac': '✅ Solved',
2424
'notac': '🟡 Attempted',
25-
None: '❌ Not attempted'}
25+
None: '❌ Not attempted',
26+
'Wrong Answer': '❌ Wrong Answer',
27+
'Accepted': '✅ Accepted',
28+
'Runtime Error': '❌ Runtime Error',
29+
'Time Limit Exceeded': '❌ Time Limit Exceeded',}
2630

2731
ALERT = Style(color='red', bold=True)
2832

0 commit comments

Comments
 (0)