Title: support | operation between typing.Union and strings by elmjag · Pull Request #6983 · RustPython/RustPython · GitHub
Open Graph Title: support | operation between typing.Union and strings by elmjag · Pull Request #6983 · RustPython/RustPython
X Title: support | operation between typing.Union and strings by elmjag · Pull Request #6983 · RustPython/RustPython
Description: Adds support for performing '|' operation between Union objects and strings, e.g. forward type references. For example following code: from typing import Union U1 = Union[int, str] U1 | "float" The result of the operation above becomes: int | str | ForwardRef('float') Summary by CodeRabbit Refactor Union-type combination now follows a typing-based path with a fast path for common cases, improving correctness and error handling. Internal typing helper consolidated into a shared typing call to simplify type-variable and typing operations. Reduced public exposure of an internal unionability helper while preserving outward union behavior.
Open Graph Description: Adds support for performing '|' operation between Union objects and strings, e.g. forward type references. For example following code: from typing import Union U1 = Union[int, str] U1 | &q...
X Description: Adds support for performing '|' operation between Union objects and strings, e.g. forward type references. For example following code: from typing import Union U1 = Union[int, str]...
Opengraph URL: https://github.com/RustPython/RustPython/pull/6983
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:f5f1f395-570b-b222-f48a-ec3a8535cf74 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C1C2:1402F1:1411734:1CA8C83:6A5F9EE3 |
| html-safe-nonce | c8479b8cc109a7999c7e388e819092129a98835d972ac06e42a05089a1d39e34 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUMyOjE0MDJGMToxNDExNzM0OjFDQThDODM6NkE1RjlFRTMiLCJ2aXNpdG9yX2lkIjoiNDMwMjExMDY0ODczNjY1MzAyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ce0ea2c0e7da8c79990278215e6d54b2680ede3d9f3e18e8c96cffef9758b369 |
| hovercard-subject-tag | pull_request:3241328969 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/6983/files |
| twitter:image | https://avatars.githubusercontent.com/u/77584583?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/77584583?s=400&v=4 |
| og:image:alt | Adds support for performing '|' operation between Union objects and strings, e.g. forward type references. For example following code: from typing import Union U1 = Union[int, str] U1 | &q... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9353cc7b48460319d80daeeb399e4919b4abcfe6f78d37c7b457924d164a40b1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 755d210ae728fcf699d7ab1cdd9866592be6ad35 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width