Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create documentation page for typing #3142

Open
A5rocks opened this issue Nov 21, 2024 · 1 comment
Open

Create documentation page for typing #3142

A5rocks opened this issue Nov 21, 2024 · 1 comment

Comments

@A5rocks
Copy link
Contributor

A5rocks commented Nov 21, 2024

I think there's sufficient nuances in trio's typing to merit a documentation page to point at. Off the top of my head:

  • that we don't support .spawn yet
  • minimum mypy version (maybe pyright version too?) because eg my currently open RaisesGroup types PR requires 1.14+ (at least that's my guess. I remember it doesn't work on 1.13.2 because of the self-types in init)
  • relationship with trio-typing (full replacement other than aforementioned not supporting .spawn)
  • how to allow nursery-like objects as a 3rd party (just use a protocol w/ the methods/attributes you want), as an alternative to the (closed) PR to export one

There's probably other stuff too, but mainly it would be useful as a link reply to anyone talking about trio-typing.

... do other people think this is a decent idea? Maybe my bullet points above are exhaustive in which case idk maybe we don't need a docs page.

@TeamSpen210
Copy link
Contributor

Seems useful, maybe also we might want to recommend some options to turn on. In particular Mypy's unused-awaitable error code, since in trio coroutine calls must always be awaited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants