Skip to content

tbtools: Fix typing of current #3013

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

Closed
wants to merge 6 commits into from
Closed

tbtools: Fix typing of current #3013

wants to merge 6 commits into from

Conversation

kevinji
Copy link
Contributor

@kevinji kevinji commented Dec 11, 2024

This preps for a typing fix in python/typeshed#13231 where __cause__ and __context__ can be None.

@kevinji
Copy link
Contributor Author

kevinji commented Dec 11, 2024

mypy is probably being too smart and seeing that if current.__cause__ is not None is always True so chained_msg is always a str and not str | None. This will probably be the case until the linked PR is merged. I can explicitly type out with list[tuple[str | None, traceback.TracebackException]] for now if desired.

@kevinji
Copy link
Contributor Author

kevinji commented Dec 23, 2024

@davidism would it be possible to review this now that the above PR is merged?

@pgjones pgjones changed the base branch from main to stable April 18, 2025 20:07
@pgjones
Copy link
Member

pgjones commented Apr 18, 2025

Thanks. I've merged it manually to stable as the change of base here didn't work as I'd hoped.

@pgjones pgjones closed this Apr 18, 2025
@kevinji kevinji deleted the patch-1 branch April 18, 2025 20:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants