Content-Length: 273707 | pFad | http://github.com/python/mypy/pull/18986/commits/516cef73ffa567dd0636d0bfd4afaf3d4b86be6c

38 Only consider meta variables in ambiguous "any of" constraints by sterliakov · Pull Request #18986 · python/mypy · GitHub
Skip to content

Only consider meta variables in ambiguous "any of" constraints #18986

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

Prev Previous commit
Next Next commit
Add reveal_type in test
  • Loading branch information
sterliakov committed May 6, 2025
commit 516cef73ffa567dd0636d0bfd4afaf3d4b86be6c
1 change: 1 addition & 0 deletions test-data/unit/check-inference.test
Original file line number Diff line number Diff line change
Expand Up @@ -3976,5 +3976,6 @@ class Mapping(Generic[_K, _V]):

def check(mapping: Mapping[str, _T]) -> None:
ok1 = mapping.get("", "")
reveal_type(ok1) # N: Revealed type is "Union[_T`-1, builtins.str]"
ok2: Union[_T, str] = mapping.get("", "")
[builtins fixtures/tuple.pyi]








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/mypy/pull/18986/commits/516cef73ffa567dd0636d0bfd4afaf3d4b86be6c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy