-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
90 lines (78 loc) · 2.27 KB
/
Copy pathpyproject.toml
File metadata and controls
90 lines (78 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[project]
name = "fast-api-template" # TODO: Change to your project name
version = "0.1.0"
description = "Add your description here" # TODO: Add your project description
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"fastapi>=0.120.2",
"pydantic-settings>=2.11.0",
"uvicorn>=0.38.0",
"httpx>=0.27.0",
]
[tool.ruff]
line-length = 80
target-version = "py314"
[tool.ruff.lint]
# Conjunto curado (evita o "ALL" ser excessivo)
select = [
"E", # pycodestyle (PEP8)
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort (ordenação de imports)
"N", # pep8-naming
"B", # flake8-bugbear
"C4", # comprehensions
"SIM", # simplify (com exceções abaixo)
"UP", # pyupgrade (sugestões p/ versões mais novas)
"PT",
"RUF", # regras específicas do Ruff
]
preview = true
# Ignora regras indesejadas
ignore = [
"G004", # f-string em logging
"SIM103", # (desligada conforme pedido)
# Permite "else após return/break/continue"
"RET505", # else after return
"RET506", # else after raise
"RET507", # else after continue
"RET508", # else after break
"D2", # Ignore docstring formatting rules
"D3", # Ignore docstring summary line rules
"D4", # Ignore docstring content rules
]
extend-select = ["D100", "D101", "D102", "D103", "D104", "D105", "D107", "E301", "E302", "E303", "E304", "E305", "E306", "D202"]
# Ignora arquivos __init__.py e diretório legacy
exclude = ["**/__init__.py", "src/legacy/**", "**/legacy/**", "notebooks/**"]
[tool.ruff.lint.isort]
# Mantém padrão consistente de imports
combine-as-imports = true
force-sort-within-sections = true
split-on-trailing-comma = true
known-first-party = ["fast_api_template"] # TODO: Update to match your project name
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "lf"
preview = false
[tool.mypy]
python_version = "3.14"
check_untyped_defs = true
disallow_untyped_defs = true
strict_optional = true
no_implicit_optional = true
warn_unused_ignores = true
warn_return_any = true
warn_redundant_casts = true
warn_unused_configs = true
ignore_missing_imports = false
pretty = true
show_error_codes = true
[dependency-groups]
dev = [
"ruff>=0.14.2",
"pytest>=8.0.0",
"pytest-cov>=6.0.0",
"httpx>=0.27.0",
]