🔧 更新 ruff 配置

This commit is contained in:
2024-05-02 20:53:27 +08:00
parent 38defe37cd
commit b2505e0979

View File

@@ -49,6 +49,10 @@ requires = ['poetry-core>=1.0.0']
build-backend = 'poetry.core.masonry.api' build-backend = 'poetry.core.masonry.api'
[tool.ruff] [tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [ select = [
'F', # pyflakes 'F', # pyflakes
'E', # pycodestyle errors 'E', # pycodestyle errors
@@ -89,14 +93,12 @@ ignore = [
'ANN202', # 向 NoneBot 注册的函数 'ANN202', # 向 NoneBot 注册的函数
'TRY003', 'TRY003',
] ]
line-length = 120
target-version = "py310"
flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' } flake8-quotes = { inline-quotes = 'single', multiline-quotes = 'double' }
[tool.ruff.flake8-annotations] [tool.ruff.lint.flake8-annotations]
mypy-init-return = true mypy-init-return = true
[tool.ruff.flake8-builtins] [tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id"] builtins-ignorelist = ["id"]
[tool.ruff.format] [tool.ruff.format]