Unfucked gemini's mess

This commit is contained in:
2025-12-07 03:27:45 +01:00
parent 5b71233fb0
commit a923a760ef
24 changed files with 1885 additions and 1282 deletions

View File

@@ -27,13 +27,44 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
# Chemins où pytest cherche les tests
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = "-v --tb=short"
# Patterns de fichiers/classes/fonctions à considérer comme tests
python_files = ["test_*.py"] # Fichiers commençant par "test_"
python_classes = ["Test*"] # Classes commençant par "Test"
python_functions = ["test_*"] # Fonctions commençant par "test_"
# Options ajoutées automatiquement à chaque exécution de pytest
addopts = [
"-v", # --verbose : affiche chaque test individuellement
"--tb=short", # --traceback=short : tracebacks courts et lisibles
"--cov=.", # --coverage : mesure le coverage de tout le projet (.)
"--cov-report=term-missing", # Affiche les lignes manquantes dans le terminal
"--cov-report=html", # Génère un rapport HTML dans htmlcov/
"--cov-report=xml", # Génère un rapport XML (pour CI/CD)
"--cov-fail-under=80", # Échoue si coverage < 80%
"-n=auto", # --numprocesses=auto : parallélise les tests (pytest-xdist)
"--strict-markers", # Erreur si un marker non déclaré est utilisé
"--disable-warnings", # Désactive l'affichage des warnings (sauf erreurs)
]
# Mode asyncio automatique pour pytest-asyncio
asyncio_mode = "auto"
# Déclaration des markers personnalisés
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"unit: marks tests as unit tests",
]
# Filtrage des warnings
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.coverage.run]
source = ["agent", "application", "domain", "infrastructure"]
omit = ["tests/*", "*/__pycache__/*"]
@@ -69,19 +100,14 @@ exclude = [
".qodo",
".vscode",
]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"TID", # flake8-tidy-imports
"PL", # pylint
"UP", # pyupgrade
]
ignore = [
"PLR0913", # Too many arguments
"PLR2004", # Magic value comparison
"E", "W",
"F",
"I",
"B",
"C4",
"TID",
"PL",
"UP",
]
ignore = ["W503", "PLR0913", "PLR2004"]