Skip to content

Commit f23662d

Browse files
committed
修正正则表达式
1 parent 1bd03a8 commit f23662d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def auto_register_api(app: OpenAPI):
4343
if not file.endswith(".py"):
4444
continue
4545
api_file = os.path.join(root, file)
46-
rule = re.split(r"src|.py", api_file)[1]
46+
rule = re.split(r"src|\.py", api_file)[1]
4747
api_route = ".".join(rule.split(os.sep)).strip(".")
4848
# noinspection PyBroadException
4949
try:

0 commit comments

Comments
 (0)