-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(python): Change method op type hints to match dunder op type hints
Type hints for operators were refined in #13635 [0], but the refinements were generally not propagated to the method equivalents (pow() being the sole exception). This can result in equivalent expressions being treated differently by type checkers, especially if stricter settings are used that discourage/disallow the use of Any. This commit changes the type hints for the method equivalents to match those for the operators. This should ensure resulting types are consistent regardless of whether one uses infix operators or their method equivalents. This also has the side benefit of making the documentation a bit more consistent as the type hint more closely matches the stated type of the argument in the docstring. [0]: 1c417e4
- Loading branch information
Alex Wang
committed
Aug 28, 2024
1 parent
b2550a0
commit f842b15
Showing
1 changed file
with
17 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters