Améliorations typing

This commit is contained in:
Colin Maudry
2026-04-18 19:01:22 +02:00
parent af3b3464e4
commit 600567330f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -360,7 +360,7 @@ def get_duplicate_matrix() -> dcc.Graph:
return dcc.Graph(figure=fig)
def get_geographic_maps(dff: pl.DataFrame) -> list | None:
def get_geographic_maps(dff: pl.DataFrame) -> list[dbc.Col] | list:
"""
Génère les cartes géographiques pour l'hexagone et les DOM-TOM.
"""
@@ -404,7 +404,7 @@ def get_geographic_maps(dff: pl.DataFrame) -> list | None:
},
}
def make_map_data(region_code: str) -> tuple[list, str or None]:
def make_map_data(region_code: str) -> tuple[list, str | None]:
lff: pl.LazyFrame = dff.lazy()
if region_code == "Hexagone":
lff = lff.filter(
+1 -1
View File
@@ -732,7 +732,7 @@ def _compute_dashboard_children(cache_key: tuple):
)
cards.append(make_card(title="Top titulaires", fig=top_titulaires, lg=12, xl=8))
geographic_maps: list[dbc.Col] = get_geographic_maps(dff)
geographic_maps: list[dbc.Col] | None = get_geographic_maps(dff)
other_cards = []
sources_barchart = get_barchart_sources(lff, type_date="dateNotification")