You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 6, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on May 6, 2026. It is now read-only.
Ditch sphinx-docstring-typing / use type annotations for ndb #9
api: datastoreIssues related to the googleapis/python-ndb API.type: docsImprovement to the documentation for an API.type: questionRequest for information or clarification. Not an issue.
See #6393. The ndb docs were using sphinx-docstring-typing to document things like Optional[bool] and Union[int, bool]. However the extension has a "bug" in that it just blindly replaces members of typing, so that TextProperty gets replaced by something along the lines of "~typing.Text"Property.
The nice typing style support can be regained if type annotations are used in cases where relevant.
If I'm understanding your question correctly, then adding type annotations for NDB in typeshed wouldn't require anything to modified in this repo. Am I reading this correctly?
I guess I wanted to make sure that there weren't already ongoing efforts to add typing annotations in the upstream repo. Then contributions to typeshed would be duplicated.
Also if contributions to this repository for typing information is welcome, is there capacity to actually review and merge it? I'm expecting this work to be low volume, since I'm doing this more or less on the side, but nevertheless someone would have to have a bit of time to check it.
So yeah either way upstream or typeshed, let me know :)
I think typeshed is the way to go at this time. If anything ever happens along these lines in NDB proper, it will likely be in response to a decision to do this across Google's Python client libraries.
api: datastoreIssues related to the googleapis/python-ndb API.type: docsImprovement to the documentation for an API.type: questionRequest for information or clarification. Not an issue.
Activity
romanofski commentedon Jul 27, 2021
I came across this closed issue because I was considering contributing type stubs to https://github.com/python/typeshed for this package. However since this issue was raised but closed, I wonder whether typing annotation contributions would be welcome?
freelancing-solutions commentedon Jul 27, 2021
chrisrossi commentedon Jul 27, 2021
Hi @romanofski ,
If I'm understanding your question correctly, then adding type annotations for NDB in typeshed wouldn't require anything to modified in this repo. Am I reading this correctly?
Chris
romanofski commentedon Jul 27, 2021
@chrisrossi That is correct.
I guess I wanted to make sure that there weren't already ongoing efforts to add typing annotations in the upstream repo. Then contributions to typeshed would be duplicated.
Also if contributions to this repository for typing information is welcome, is there capacity to actually review and merge it? I'm expecting this work to be low volume, since I'm doing this more or less on the side, but nevertheless someone would have to have a bit of time to check it.
So yeah either way upstream or typeshed, let me know :)
chrisrossi commentedon Jul 28, 2021
I think typeshed is the way to go at this time. If anything ever happens along these lines in NDB proper, it will likely be in response to a decision to do this across Google's Python client libraries.