修复代码警告

This commit is contained in:
2024-07-23 17:27:09 +08:00
parent d2ea9ec521
commit 72e23e3132
3 changed files with 8 additions and 8 deletions

View File

@@ -102,7 +102,7 @@ def parse_department(string):
result = []
if not string:
return result
string = re.sub(r'\([^()]*\)|\[[^\[\]]*\]|\{[^\{\}]*\}|[^]*|[^⺀-鿿]', '', string)[:255]
string = re.sub(r'\([^()]*\)|\[[^\[\]]*]|\{[^{}]*}|[^]*|[^⺀-鿿]', '', string)[:255]
if string == "":
return result
result.append(string)