Skip to content
This repository was archived by the owner on May 6, 2026. It is now read-only.
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

Closed

Description

@dhermes

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.

Activity

  1. self-assigned this
    on Nov 6, 2018
  2. added
    triage me
    🚨
    on Apr 29, 2019
  3. added
    type: docs
    and removed
    🚨
    triage me
    on May 13, 2019
  4. romanofski commented on Jul 27, 2021

    @romanofski

    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?

  5. freelancing-solutions commented on Jul 27, 2021

    @freelancing-solutions
  6. added
    type: question
    on Jul 27, 2021
  7. added
    api: datastore
    on Jul 27, 2021
  8. chrisrossi commented on Jul 27, 2021

    @chrisrossi
    Contributor

    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

  9. romanofski commented on Jul 27, 2021

    @romanofski

    @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 :)

  10. chrisrossi commented on Jul 28, 2021

    @chrisrossi
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datastoretype: docstype: question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions