我正在为某些函数编写类型注释,但找不到注释预期类型为 的参数的最佳方法matplotlib.axes._axes.Axes。
我什至不确定我是否为预期为 类型的参数做了正确的事情pandas.core.frame.DataFrame。
def myfunc(
df: pd.DataFrame, # is this correct?
ax: matplotlib.axes._axes.Axes # do I have to use this?
) -> None:
# body of my function
Run Code Online (Sandbox Code Playgroud)
一些见解?
谢谢。