Skip to content

Commit bb0ce7a

Browse files
committed
Enabled all ruff rules instead of a small selection of rules
1 parent 6002cf5 commit bb0ce7a

1 file changed

Lines changed: 46 additions & 46 deletions

File tree

backend/pyproject.toml

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,47 @@ version = "0.1.0"
44
description = ""
55
requires-python = ">=3.10,<4.0"
66
dependencies = [
7-
"fastapi[standard]<1.0.0,>=0.114.2",
8-
"python-multipart<1.0.0,>=0.0.7",
9-
"email-validator<3.0.0.0,>=2.1.0.post1",
10-
"tenacity<9.0.0,>=8.2.3",
11-
"pydantic>2.0",
12-
"emails<1.0,>=0.6",
13-
"jinja2<4.0.0,>=3.1.4",
14-
"alembic<2.0.0,>=1.12.1",
15-
"httpx<1.0.0,>=0.25.1",
16-
"psycopg[binary]<4.0.0,>=3.1.13",
17-
"sqlmodel<1.0.0,>=0.0.21",
18-
"pydantic-settings<3.0.0,>=2.2.1",
19-
"sentry-sdk[fastapi]>=2.0.0,<3.0.0",
20-
"pyjwt<3.0.0,>=2.8.0",
21-
"pwdlib[argon2,bcrypt]>=0.3.0",
7+
"alembic<2.0.0,>=1.12.1",
8+
"email-validator<3.0.0.0,>=2.1.0.post1",
9+
"emails<1.0,>=0.6",
10+
"fastapi[standard]<1.0.0,>=0.114.2",
11+
"httpx<1.0.0,>=0.25.1",
12+
"jinja2<4.0.0,>=3.1.4",
13+
"psycopg[binary]<4.0.0,>=3.1.13",
14+
"pwdlib[argon2,bcrypt]>=0.3.0",
15+
"pydantic>2.0",
16+
"pydantic-settings<3.0.0,>=2.2.1",
17+
"pyjwt<3.0.0,>=2.8.0",
18+
"python-multipart<1.0.0,>=0.0.7",
19+
"sentry-sdk[fastapi]>=2.0.0,<3.0.0",
20+
"sqlmodel<1.0.0,>=0.0.21",
21+
"tenacity<9.0.0,>=8.2.3",
2222
]
2323

2424
[dependency-groups]
2525
dev = [
26-
"pytest<8.0.0,>=7.4.3",
27-
"mypy<2.0.0,>=1.8.0",
28-
"ruff<1.0.0,>=0.2.2",
29-
"prek>=0.2.24,<1.0.0",
30-
"coverage<8.0.0,>=7.4.3",
26+
"coverage<8.0.0,>=7.4.3",
27+
"mypy<2.0.0,>=1.8.0",
28+
"prek>=0.2.24,<1.0.0",
29+
"pytest<8.0.0,>=7.4.3",
30+
"ruff<1.0.0,>=0.2.2",
3131
]
3232

3333
[build-system]
3434
requires = ["hatchling"]
3535
build-backend = "hatchling.build"
3636

37+
[tool.coverage.run]
38+
source = ["app"]
39+
dynamic_context = "test_function"
40+
41+
[tool.coverage.report]
42+
show_missing = true
43+
sort = "-Cover"
44+
45+
[tool.coverage.html]
46+
show_contexts = true
47+
3748
[tool.mypy]
3849
strict = true
3950
exclude = ["venv", ".venv", "alembic"]
@@ -43,35 +54,24 @@ target-version = "py310"
4354
exclude = ["alembic"]
4455

4556
[tool.ruff.lint]
46-
select = [
47-
"E", # pycodestyle errors
48-
"W", # pycodestyle warnings
49-
"F", # pyflakes
50-
"I", # isort
51-
"B", # flake8-bugbear
52-
"C4", # flake8-comprehensions
53-
"UP", # pyupgrade
54-
"ARG001", # unused arguments in functions
55-
"T201", # print statements are not allowed
56-
]
57+
select = ["ALL"] # Enable all linters.
5758
ignore = [
58-
"E501", # line too long, handled by black
59-
"B008", # do not perform function calls in argument defaults
60-
"W191", # indentation contains tabs
61-
"B904", # Allow raising exceptions without from e, for HTTPException
59+
# Ignores from the original template
60+
"E501", # line too long, handled by black
61+
"B008", # do not perform function calls in argument defaults
62+
"W191", # indentation contains tabs
63+
"B904", # Allow raising exceptions without from e, for HTTPException
64+
# Additional ignores.
65+
"D", # Existing code does not contain docstrings.
66+
# Too many false positives.
67+
"TC001",
68+
"TC002",
69+
"TC003",
6270
]
6371

72+
[tool.ruff.lint.per-file-ignores]
73+
"tests/**/*.py" = ["S101"] # Asserts should be allowed in tests.
74+
6475
[tool.ruff.lint.pyupgrade]
6576
# Preserve types, even if a file imports `from __future__ import annotations`.
6677
keep-runtime-typing = true
67-
68-
[tool.coverage.run]
69-
source = ["app"]
70-
dynamic_context = "test_function"
71-
72-
[tool.coverage.report]
73-
show_missing = true
74-
sort = "-Cover"
75-
76-
[tool.coverage.html]
77-
show_contexts = true

0 commit comments

Comments
 (0)