KEMBAR78
Clean-up and move operator access to checkmember.py by ilevkivskyi · Pull Request #19250 · python/mypy · GitHub
Skip to content

Conversation

ilevkivskyi
Copy link
Member

Fixes #5136
Fixes #5491

This is a fifth "major" PR toward #7724. Although it would be impractical to move all the operator special-casing to checkmember.py, this does two things:

  • Removes known inconsistencies in operator handling
  • Adds a much more complete has_operator() helper that can be a starting point for future performance optimizations

@ilevkivskyi ilevkivskyi requested a review from JukkaL June 7, 2025 21:38
@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good.

@ilevkivskyi ilevkivskyi merged commit ac511d6 into python:master Jun 9, 2025
19 checks passed
@ilevkivskyi ilevkivskyi deleted the rename-has-member branch June 9, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants