如何让PyCharm理解返回变量的完成?PyCharm:指定返回变量的类型?
按https://www.jetbrains.com/help/pycharm/5.0/type-hinting-in-pycharm.html
我断言一个变量的类型,但没有得到任何的完成。
import boto.kinesis
x = boto.kinesis.connect_to_region("us-west-2")
assert isinstance(x, boto.kinesis.layer1.KinesisConnection)
foo = x. <--- not getting completions here
的Python 2.7,PyCharm社区版2016年1月2日
这两个工作,谢谢。我正在使用JetBrains提交增强请求,以消除额外导入的需求。 –
@MarkHarrison我怀疑他们会参考'boto.kinesis'包的结构/定义方式,因为'layer1'没有明确列在'__all__'里面,看起来与http://stackoverflow.com/questions/23248017/有关无法找到的参考-XXX-在-INIT-PY-蟒蛇,pycharm。 – alecxe