Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
Accelerator
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Type
/
to search
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
python
/
mypy
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
3.3k
Star
20.6k
Code
Issues
2.7k
Pull requests
460
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Extend special case for context-based typevar inference to typevar unions in return position
- #18976
#18976
Merged
hauntsaninja
merged 9 commits into
python:master
python/mypy:master
from
sterliakov:bugfix/gh-17221-typevar-union-context
sterliakov/mypy:bugfix/gh-17221-typevar-union-context
Copy head branch name to clipboard
May 15, 2025
Conversation
Commits
9
(9)
Checks
Files changed
Merged
Extend special case for context-based typevar inference to typevar unions in return position
#18976
hauntsaninja
merged 9 commits into
python:master
python/mypy:master
from
sterliakov:bugfix/gh-17221-typevar-union-context
sterliakov/mypy:bugfix/gh-17221-typevar-union-context
Copy head branch name to clipboard
Commits
Commits on Apr 26, 2025
Extend special-case for context-based typevar inference in return position to typevar unions
sterliakov
committed
c4baf4e
View commit details
Copy full SHA for c4baf4e
Browse repository at this point
Add missing get_proper_type
sterliakov
committed
8331546
View commit details
Copy full SHA for 8331546
Browse repository at this point
Fix a regression with `mapping.get(key, default_singleton)`
sterliakov
committed
7fcae0f
View commit details
Copy full SHA for 7fcae0f
Browse repository at this point
Switch to detecting *any* typevar in union in return position - `T | str` is no less problematic
sterliakov
committed
43c097c
View commit details
Copy full SHA for 43c097c
Browse repository at this point
Revert attempt to fix Mapping.get
sterliakov
committed
e377115
View commit details
Copy full SHA for e377115
Browse repository at this point
Commits on Apr 27, 2025
Revert to `all()` - inferring for unions of typevar and something seem to be helpful
sterliakov
committed
3f04d8e
View commit details
Copy full SHA for 3f04d8e
Browse repository at this point
Commits on May 6, 2025
Merge branch 'master' into bugfix/gh-17221-typevar-union-context
sterliakov
authored
01cbfbc
View commit details
Copy full SHA for 01cbfbc
Browse repository at this point
Remove xfail test - fixed in previous PR
sterliakov
committed
f1e4dfc
View commit details
Copy full SHA for f1e4dfc
Browse repository at this point
Commits on May 14, 2025
Merge branch 'master' into bugfix/gh-17221-typevar-union-context
sterliakov
authored
8b5d140
View commit details
Copy full SHA for 8b5d140
Browse repository at this point
You can’t perform that action at this time.