-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
81 lines (69 loc) · 1.62 KB
/
pyproject.toml
File metadata and controls
81 lines (69 loc) · 1.62 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
[project]
name = "arquitetura-de-software"
version = "0.1.0"
description = "API REST para gerenciamento de pessoas e pets"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"flask>=3.1.2",
"flask-cors>=6.0.1",
"sqlalchemy>=2.0.44",
"ruff>=0.8.4",
"pydantic>=2.12.5",
]
[project.optional-dependencies]
dev = [
"pytest>=9.0.1",
"pytest-mock>=3.15.1",
"mock-alchemy>=0.2.6",
"pre-commit>=4.4.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.ruff]
# Compatível com Python 3.12+
target-version = "py312"
# Mesma estrutura do projeto
line-length = 88
# Diretórios a ignorar
exclude = [
".git",
"__pycache__",
"venv",
".venv",
"*.egg-info",
]
[tool.ruff.lint]
# Selecionar regras similares ao Pylint
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
]
# Ignorar algumas regras (equivalente ao .pylintrc)
ignore = [
"E501", # line too long (deixa o formatter lidar com isso)
]
[tool.ruff.lint.per-file-ignores]
# Permitir imports não usados em __init__.py
"__init__.py" = ["F401"]
# Permitir assert em testes
"*_test.py" = ["S101"]
"test_*.py" = ["S101"]
[tool.ruff.format]
# Usar aspas duplas
quote-style = "double"
# Usar indentação com espaços
indent-style = "space"
# Respeitar magic trailing comma
skip-magic-trailing-comma = false