[英]Typehints for ndb Google Cloud Datastore in PyCharm are missing
There are no type hints for instance objects of the ndb
Model class. ndb
Model class 的实例对象没有类型提示。
For example some_datetime
does not show any type hints.例如
some_datetime
不显示任何类型提示。 Type hints work in other places.类型提示适用于其他地方。
Do I need to install something specifically for type hints to work with the ndb
library?我是否需要专门为类型提示安装一些东西才能与
ndb
库一起使用?
from google.cloud import ndb
class MyModel(ndb.Model):
some_datetime = ndb.DateTimeProperty()
def f(self):
self.some_datetime # PyCharm does not give type hints for datetime obj
# I expect hints like .timestamp, .tzinfo, etc
Link to ndb library .链接到ndb 库。
I've been able to reproduce your issue and I've been looking for this but I haven't managed to find anything neither in Google's nor PyCharm's documentation.我已经能够重现您的问题并且我一直在寻找这个,但我在 Google 和 PyCharm 的文档中都没有找到任何东西。
Regardless, I believe this issue has more to do with PyCharm so you should consider submitting a request in their support page .无论如何,我相信这个问题与 PyCharm 有更多关系,因此您应该考虑在他们的支持页面中提交请求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.