Améliorations typing
This commit is contained in:
+2
-2
@@ -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(
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user