```
style(code): 优化代码导入顺序与 docstring 结构 (main) 调整多个模块的 import 顺序以符合 PEP8 推荐。 在函数和方法的 docstring 中增加空行以提高可读性。 修复部分日志与异常处理的不一致格式。 更新 pyproject.toml 中 ruff 配置,提高圈复杂度阈值。 无功能性变化,仅代码结构与格式优化。 ```
This commit is contained in:
@@ -35,7 +35,7 @@ dev = [
|
||||
|
||||
[tool.ruff]
|
||||
preview = true
|
||||
line-length = 336
|
||||
line-length = 320
|
||||
|
||||
[tool.ruff.lint]
|
||||
# pylint规则
|
||||
@@ -60,7 +60,7 @@ select = [
|
||||
# pylint src --disable=import-error,no-member,line-too-long,broad-exception-caught,broad-exception-raised,logging-fstring-interpolation,too-many-positional-arguments,too-many-instance-attributes,too-many-arguments,too-many-locals,too-many-branches,too-many-statements,too-many-nested-blocks,raise-missing-from,singleton-comparison,too-few-public-methods,consider-iterating-dictionary,consider-using-set-comprehension,not-callable,logging-not-lazy,consider-using-f-string,invalid-name,too-many-public-methods,global-statement,unnecessary-pass,wildcard-import,consider-using-join,cell-var-from-loop,too-many-return-statements,import-outside-toplevel,bare-except,subprocess-run-check,consider-using-dict-items,too-many-boolean-expressions,too-many-lines
|
||||
|
||||
# 圈复杂度
|
||||
mccabe = { max-complexity = 17 }
|
||||
mccabe = { max-complexity = 26 }
|
||||
|
||||
ignore = [
|
||||
"BLE001",
|
||||
@@ -96,6 +96,7 @@ ignore = [
|
||||
"S501",
|
||||
"S324",
|
||||
"S104",
|
||||
"D401",
|
||||
]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
|
||||
Reference in New Issue
Block a user