Skip to content

Commit 0bca2c3

Browse files
authored
[Docathon][CodeStyle Fix No.8] enable C403 rule (#6266)
1 parent 736b9b5 commit 0bca2c3

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

docs/api/gen_doc.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -400,16 +400,16 @@ def set_display_attr_of_apis():
400400
set the display attr
401401
"""
402402
if os.path.exists(NOT_DISPLAY_DOC_LIST_FILENAME):
403-
display_none_apis = set(
404-
[line.strip() for line in open(NOT_DISPLAY_DOC_LIST_FILENAME, "r")]
405-
)
403+
display_none_apis = {
404+
line.strip() for line in open(NOT_DISPLAY_DOC_LIST_FILENAME, "r")
405+
}
406406
else:
407407
logger.warning("file not exists: %s", NOT_DISPLAY_DOC_LIST_FILENAME)
408408
display_none_apis = set()
409409
if os.path.exists(DISPLAY_DOC_LIST_FILENAME):
410-
display_yes_apis = set(
411-
[line.strip() for line in open(DISPLAY_DOC_LIST_FILENAME, "r")]
412-
)
410+
display_yes_apis = {
411+
line.strip() for line in open(DISPLAY_DOC_LIST_FILENAME, "r")
412+
}
413413
else:
414414
logger.warning("file not exists: %s", DISPLAY_DOC_LIST_FILENAME)
415415
display_yes_apis = set()

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ ignore = [
8080
"F401",
8181
"W291",
8282
"PLR1722",
83-
"C403",
8483
"E401",
8584
"E711",
8685
"E712",

0 commit comments

Comments
 (0)