创建扩展名为
.pyi
的空存根文件。 通过存根文件可以同时对 Python 2 和 Python 3 使用 Python 3 语法来指定类型提示。
有关详细信息,请参阅
使用存根文件
。