Python 3.x 在类中注释self方法

Python 3.x 在类中注释self方法,python-3.x,annotations,Python 3.x,Annotations,我尝试了Test,它提示Test没有定义。如何注释代码 类测试: def测试功能(自)-> 返回自我

我尝试了
Test
,它提示
Test没有定义
。如何注释代码

类测试:
def测试功能(自)->
返回自我