加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pyproject.toml 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
st1020 提交于 2023-08-28 11:06 . fix: ruff error
[tool.mypy]
plugins = ["mypy_django_plugin.main"]
[tool.django-stubs]
django_settings_module = "dongtai_conf.settings"
[tool.black]
line-length = 120
target-version = ["py310"]
[tool.ruff]
line-length = 120
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"YTT", # flake8-2020
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"PGH", # pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
"FLY", # flynt
"PERF", # Perflint
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Line too long, handled by black
"SIM112", # Use capitalized environment variable
"PGH003", # Use specific rule codes when ignoring type issues
"PLR091", # Too many ...
"PLR2004", # Magic value used in comparison
"RUF012", # Mutable class attributes should be annotated with typing.ClassVar
"TRY003", # Avoid specifying long messages outside the exception class
"TRY301", # Abstract raise to an inner function
"PERF203", # try-except within a loop incurs performance overhead
]
# target version is python 3.9 because Cython not support some python 3.10 feature
target-version = "py39"
[tool.ruff.per-file-ignores]
"test/*.py" = ["T201"]
"**/tests.py" = ["T201"]
"deploy/*.py" = ["T201"]
"dongtai_conf/*.py" = ["T201"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化