简体   繁体   English

PyCharm 中 ndb Google Cloud Datastore 的类型提示丢失

[英]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.

相关问题 如何在 python3 中使用 google-cloud-ndb 库在谷歌云数据存储上进行交易 - How to do transactions using on google cloud datastore using google-cloud-ndb library in python3 在新的 Cloud Datastore 模式下实现 ndb.StructuredProperty 的等效性? - Achieving the equivalence of ndb.StructuredProperty in new Cloud Datastore Mode? 安装 google-cloud-datastore 卡在 grpcio 上 - Installation of google-cloud-datastore stuck on grpcio Google Cloud Datastore 和 Flask App Engine - Google Cloud Datastore and Flask App Engine 包括 Google Cloud Datastore Python3 AttributeError - Google Cloud Datastore Python3 AttributeError on include Windows 10 上的 Google Cloud Datastore 身份验证 - Google Cloud Datastore Authentication on Windows 10 在谷歌应用引擎和 ndb 数据存储中从 python2.7 升级到 python3.7 - upgrading from python2.7 to python3.7 in google app engine and ndb datastore 如何从 Cloud Run 连接到 Google Cloud Datastore? - How can you connect to Google Cloud Datastore from Cloud Run? 适用于 Google Cloud 的 PyCharm 中 Python 的 SmartType 代码完成 - SmartType Code Completion for Python in PyCharm for Google Cloud 使用 Python3x 的 Google Cloud Datastore 中的 UTF-8 字符串? - UTF-8 strings in the Google Cloud Datastore using Python3x?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM