Closed rsokl closed 1 month ago
Hey @rsokl, it looks like that was the first time we merged one of your PRs! Thanks so much! :tada: :birthday:
If you want to keep contributing, we'd love to have you. So, I just sent you an invitation to join the python-trio organization on Github! If you accept, then here's what will happen:
Github will automatically subscribe you to notifications on all our repositories. (But you can unsubscribe again if you don't want the spam.)
You'll be able to help us manage issues (add labels, close them, etc.)
You'll be able to review and merge other people's pull requests
You'll get a [member] badge next to your name when participating in the Trio repos, and you'll have the option of adding your name to our member's page and putting our icon on your Github profile (details)
If you want to read more, here's the relevant section in our contributing guide.
Alternatively, you're free to decline or ignore the invitation. You'll still be able to contribute as much or as little as you like, and I won't hassle you about joining again. But if you ever change your mind, just let us know and we'll send another invitation. We'd love to have you, but more importantly we want you to do whatever's best for you.
If you have any questions, well... I am just a humble Python script, so I probably can't help. But please do post a comment here, or in our chat, or on our forum, whatever's easiest, and someone will help you out!
@rsokl Thank you for the fix, but please note that trio-typing is somewhat unloved now that trio comes with built-in support for type hints. Please consider using those instead - they were already correct in this respect :-)
The current return type of
CancelScope.__exit__
isbool | None
, which tells type checkers thatCancelScope
cannot suppress errors:https://typing.readthedocs.io/en/latest/spec/exceptions.html#context-managers
This is bad. If there were ever a context manager that could suppress errors, it would be
CancelScope
😄Given:
Before: pyright says the return type of
f
isint
. I.e. it thinks thereturn None
is unreachable After: pyright says the return type off
isint | None
, which is correct.