Python自动化测试(1) : json到thrift转换

从thrift到pyi转换

pyi是什么?为什么要用pyi?可见官方解释

The *.pyi files are used by PyCharm and other development tools to
provide more information, such as PEP 484 type hints, than it is able
to glean from introspection of extension types and methods. They are
not intended to be imported, executed or used for any other purpose
other than providing info to the tools. If you don’t use use a tool
that makes use of .pyi files then you can safely ignore this file.

See: https://www.python.org/dev/peps/pep-0484/
https://www.jetbrains.com/help/pycharm/2016.1/type-hinting-in-pycharm.html

简单来说就是存根文件,文件包含普通Python模块的类型提示信息,可以帮我们增加thrift的类型提示。为了方便使用,将thrift转换为pyi的方式,方便class的查找,具体使用方式:

 pip ins

你可能感兴趣的:(测试相关)