Skip to content

Commit 2fe893d

Browse files
committed
Update check-python-formatting GitHub action
1 parent 9be0438 commit 2fe893d

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/check-python-formatting.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v4
1111

12-
- name: Check file formatting with Black
13-
uses: psf/black@stable
14-
with:
15-
options: "--check --verbose"
12+
- name: Check file formatting
13+
run: |
14+
pip install black
15+
black --check .

leetcode_export/__main__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
Export your LeetCode submissions and related problem statements.
55
"""
6+
67
import argparse
78
import logging
89
import os
@@ -214,9 +215,9 @@ def main():
214215
problem_folder_name = problem_folder_name_template.substitute(
215216
**problem_statement.__dict__
216217
)
217-
title_slug_to_problem_folder_name[
218-
submission.title_slug
219-
] = problem_folder_name
218+
title_slug_to_problem_folder_name[submission.title_slug] = (
219+
problem_folder_name
220+
)
220221
if not os.path.exists(problem_folder_name):
221222
os.mkdir(problem_folder_name)
222223
os.chdir(problem_folder_name)

leetcode_export/leetcode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
LeetCode Python APIs for retrieving submitted problems and problem statements.
33
"""
4+
45
import datetime
56
import logging
67
from time import sleep

0 commit comments

Comments
 (0)