Skip to content

Commit 244964c

Browse files
authoredFeb 22, 2024
chore: upgrade workflow (doocs#2367)
1 parent ba6db03 commit 244964c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎.github/workflows/black-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: jpetrucciani/black-check@23.12.1
13+
- uses: jpetrucciani/black-check@24.2.0
1414
with:
1515
black_flags: '-S'

‎solution/util.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ def generate_question_readme(result):
181181
def generate_category_summary(result, category=""):
182182
"""generate category summary files"""
183183
summary_cn = (
184-
"- " + category_dict.get(category, category) + "专项练习\n\n" if category else ""
184+
"- " + category_dict.get(category, category) + "专项练习\n\n"
185+
if category
186+
else ""
185187
)
186188
summary_en = "- " + category + " Practice\n\n" if category else ""
187189
category = category.lower() if category else ""
@@ -306,7 +308,9 @@ def refresh(result):
306308
)
307309

308310
# update question content
309-
old_content = re.search("<!-- 这里写题目描述 -->(.*?)## 解法", cn_content, re.S).group(1)
311+
old_content = re.search(
312+
"<!-- 这里写题目描述 -->(.*?)## 解法", cn_content, re.S
313+
).group(1)
310314
if question.get("content_cn"):
311315
cn_content = cn_content.replace(
312316
old_content, "\n\n" + question["content_cn"] + "\n\n"

0 commit comments

Comments
 (0)