🔧 Adopt Ruff for formatting (#679)

This commit is contained in:
Sebastián Ramírez
2023-10-26 18:32:26 +04:00
committed by GitHub
parent 8d14232538
commit 7fdfee10a5
5 changed files with 14 additions and 18 deletions

View File

@@ -38,6 +38,7 @@ sqlalchemy2-stubs = {version = "*", allow-prereleases = true}
[tool.poetry.group.dev.dependencies]
pytest = "^7.0.1"
mypy = "0.971"
# Needed by the code generator using templates
black = "^22.10.0"
mkdocs-material = "9.1.21"
pillow = "^9.3.0"
@@ -46,7 +47,7 @@ mdx-include = "^1.4.1"
coverage = {extras = ["toml"], version = "^6.2"}
fastapi = "^0.68.1"
requests = "^2.26.0"
ruff = "^0.1.1"
ruff = "^0.1.2"
[build-system]
requires = ["poetry-core"]
@@ -87,11 +88,13 @@ select = [
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"W191", # indentation contains tabs
]
[tool.ruff.per-file-ignores]
@@ -99,3 +102,7 @@ ignore = [
[tool.ruff.isort]
known-third-party = ["sqlmodel", "sqlalchemy", "pydantic", "fastapi"]
[tool.ruff.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true