From: Sebastián Ramírez Date: Tue, 26 Mar 2024 17:35:15 +0000 (-0500) Subject: ⬆️ Upgrade Ruff version and configs (#859) X-Git-Tag: 0.0.17~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf51a11dcf1d9ff1bf039827e55ea33fe76408a3;p=thirdparty%2Ffastapi%2Fsqlmodel.git ⬆️ Upgrade Ruff version and configs (#859) --- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b21e5ac9..3289dd09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 10d73793..9da631b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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