forked from LuisVilRiv/comprobador-de-paginas-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
67 lines (61 loc) · 2.37 KB
/
Copy pathpyproject.toml
File metadata and controls
67 lines (61 loc) · 2.37 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
[tool.ruff]
target-version = "py312"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"T20", # flake8-print (detecta prints olvidados)
]
ignore = [
"E501", # line too long (controlado por line-length del formatter)
"E701", # multiple statements on one line — estilo aceptado en el proyecto
"E702", # multiple statements on one line with semicolon
"E712", # comparison to True/False — permitido por claridad con SQLAlchemy filters
"B008", # function call in default argument — común en FastAPI (Depends)
"SIM108", # ternary operator — no forzar
"SIM102", # nested if — a veces más legible separado
"SIM105", # contextlib.suppress — try/except/pass es más explícito
"SIM117", # nested with — separar es más legible en sockets/SSL
"UP007", # X | Y union syntax — mantener compatibilidad
"N806", # uppercase variables in functions — usado para constantes locales (thresholds)
"N812", # lowercase imported as non-lowercase — EC es convención estándar en Selenium
"B005", # .strip() con multi-char — lstrip("www.") es intencional
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["T20"] # permitir prints en tests
"config/*" = ["E402"] # imports dinámicos en config
"docker/dashboard/api/app.py" = ["E402"] # sys.path manipulation antes de imports
"docker/scraper/entrypoint.py" = ["E402", "T20"]
"docker/scraper/service.py" = ["T20"]
"docker/scraper/scheduler.py" = ["T20"]
"docker/ai-analyzer/*" = ["T20"]
[tool.ruff.lint.isort]
known-first-party = ["config", "scraper", "shared"]
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
[tool.mypy]
python_version = "3.12"
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false
check_untyped_defs = true
ignore_missing_imports = true
exclude = [
"tests/",
"docs/",
"docker/ai-analyzer/", # usa tipos complejos de sentence-transformers/torch
".venv/",
]
[[tool.mypy.overrides]]
module = "shared.database.models"
# SQLAlchemy declarative_base() no es compatible con mypy sin migrar a DeclarativeBase
disable_error_code = ["valid-type", "misc"]