⬆️ Upgrade Ruff version and configs (#859)
This commit is contained in:
parent
9d0b8b6a93
commit
bf51a11dcf
@ -14,7 +14,7 @@ repos:
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.6
|
||||
rev: v0.2.0
|
||||
hooks:
|
||||
- id: ruff
|
||||
args:
|
||||
|
@ -47,7 +47,7 @@ cairosvg = "^2.5.2"
|
||||
mdx-include = "^1.4.1"
|
||||
coverage = {extras = ["toml"], version = ">=6.2,<8.0"}
|
||||
fastapi = "^0.103.2"
|
||||
ruff = "^0.1.2"
|
||||
ruff = "0.2.0"
|
||||
# For FastAPI tests
|
||||
httpx = "0.24.1"
|
||||
# TODO: upgrade when deprecating Python 3.7
|
||||
@ -92,14 +92,14 @@ disallow_incomplete_defs = false
|
||||
disallow_untyped_defs = false
|
||||
disallow_untyped_calls = false
|
||||
|
||||
[tool.ruff]
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"C", # flake8-comprehensions
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"UP", # pyupgrade
|
||||
]
|
||||
ignore = [
|
||||
@ -109,12 +109,12 @@ ignore = [
|
||||
"W191", # indentation contains tabs
|
||||
]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
# "__init__.py" = ["F401"]
|
||||
|
||||
[tool.ruff.isort]
|
||||
[tool.ruff.lint.isort]
|
||||
known-third-party = ["sqlmodel", "sqlalchemy", "pydantic", "fastapi"]
|
||||
|
||||
[tool.ruff.pyupgrade]
|
||||
[tool.ruff.lint.pyupgrade]
|
||||
# Preserve types, even if a file imports `from __future__ import annotations`.
|
||||
keep-runtime-typing = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user