Handle unions with GenericAlias subclasses without TypeError (#6540)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: youknowone <69878+youknowone@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
This commit is contained in:
authored and GitHub committed 2025-12-27 01:13:20 +09:00
1 parent b704f42158
commit a7d7f81ca7
5 files changed
+27 -10

No files matched your search

+4
View File
@@ -8,3 +8,7 @@ def abort_signal_handler(
fn: Callable[[], Awaitable[T]], on_abort: Callable[[], None] | None = None
) -> T:
pass
# Ensure PEP 604 unions work with typing.Callable aliases.
TracebackFilter = bool | Callable[[int], int]