[tool.ruff]
# 目标 Python 版本
target-version = "py39"
# 每行最大长度
line-length = 100
# 需要检查的目录
src = ["src", "tests"]
[tool.ruff.lint]
# 启用的规则集:
# E/W = pycodestyle(PEP8 风格)
# F = pyflakes(未使用变量/导入等)
# I = isort(import 排序)
# B = flake8-bugbear(常见 bug 模式)
# UP = pyupgrade(过时写法升级)
select = ["E", "W", "F", "I", "B", "UP"]
ignore = []
[tool.ruff.format]
# 使用双引号,风格与 black 一致
quote-style = "double"
indent-style = "space"