Skip to content

Commit bf51a11

Browse files
authored
⬆️ Upgrade Ruff version and configs (#859)
1 parent 9d0b8b6 commit bf51a11

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: end-of-file-fixer
1515
- id: trailing-whitespace
1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.1.6
17+
rev: v0.2.0
1818
hooks:
1919
- id: ruff
2020
args:

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ cairosvg = "^2.5.2"
4747
mdx-include = "^1.4.1"
4848
coverage = {extras = ["toml"], version = ">=6.2,<8.0"}
4949
fastapi = "^0.103.2"
50-
ruff = "^0.1.2"
50+
ruff = "0.2.0"
5151
# For FastAPI tests
5252
httpx = "0.24.1"
5353
# TODO: upgrade when deprecating Python 3.7
@@ -92,14 +92,14 @@ disallow_incomplete_defs = false
9292
disallow_untyped_defs = false
9393
disallow_untyped_calls = false
9494

95-
[tool.ruff]
95+
[tool.ruff.lint]
9696
select = [
9797
"E", # pycodestyle errors
9898
"W", # pycodestyle warnings
9999
"F", # pyflakes
100100
"I", # isort
101-
"C", # flake8-comprehensions
102101
"B", # flake8-bugbear
102+
"C4", # flake8-comprehensions
103103
"UP", # pyupgrade
104104
]
105105
ignore = [
@@ -109,12 +109,12 @@ ignore = [
109109
"W191", # indentation contains tabs
110110
]
111111

112-
[tool.ruff.per-file-ignores]
112+
[tool.ruff.lint.per-file-ignores]
113113
# "__init__.py" = ["F401"]
114114

115-
[tool.ruff.isort]
115+
[tool.ruff.lint.isort]
116116
known-third-party = ["sqlmodel", "sqlalchemy", "pydantic", "fastapi"]
117117

118-
[tool.ruff.pyupgrade]
118+
[tool.ruff.lint.pyupgrade]
119119
# Preserve types, even if a file imports `from __future__ import annotations`.
120120
keep-runtime-typing = true

0 commit comments

Comments
 (0)