For example, for the function shown below, can I just specify Figure
as the type of the output of this function returning a graph_objects
figure?
def make_pie_chart(inputs: List[int], title: str) -> Figure:
fig = go.Figure(
data=[
go.Pie(
labels=["A", "B", "C"],
values=inputs,
textinfo="label+percent",
textposition="inside",
marker={"colors": [COLORS["A"], COLORS["B"], COLORS["C"]]},
sort=False,
hoverinfo="none",
)
]
)
fig.update_layout(
title_text=title,
title_x=0.5,
margin=dict(b=25, t=75, l=35, r=25),
height=325,
paper_bgcolor=COLORS["background"],
)
return fig