]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
⬆️ Upgrade Ruff version and configs (#859)
authorSebastián Ramírez <tiangolo@gmail.com>
Tue, 26 Mar 2024 17:35:15 +0000 (12:35 -0500)
committerGitHub <noreply@github.com>
Tue, 26 Mar 2024 17:35:15 +0000 (17:35 +0000)
.pre-commit-config.yaml
pyproject.toml

index b21e5ac9cc69fd74c483f05bc70f5d2a5e691923..3289dd0950a52e68ae22ab7787c69941b3442600 100644 (file)
@@ -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:
index 10d73793d29e18a741aff26302f18ce88bf0b1d3..9da631b985f7b13686fbf54413f11601bf1fabf8 100644 (file)
@@ -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