Ajout d'un paramètre de tour pour importer des données

This commit is contained in:
2024-07-19 22:10:20 +02:00
parent 645951823a
commit 2908f94b4a
4 changed files with 122 additions and 57 deletions

View File

@ -417,7 +417,11 @@ def calculer_resultats_france(engine: Engine, verbose: bool = False) -> None:
session.commit()
def run(engine: Engine, verbose: bool = False) -> None:
def run(engine: Engine, data_round: int = 0, verbose: bool = False) -> None:
if data_round != 0 and data_round != 1:
# Un seul tour à l'élection européenne
return
importer_resultats_region(engine, verbose)
importer_resultats_departement(engine, verbose)
calculer_resultats_france(engine, verbose)