8000 Regression - Module "_typeshed" has no attribute "SupportsLessThan" · Issue #12355 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Regression - Module "_typeshed" has no attribute "SupportsLessThan" #12355

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

Closed
Zeckie opened this issue Mar 15, 2022 · 1 comment · Fixed by #12356
Closed

Regression - Module "_typeshed" has no attribute "SupportsLessThan" #12355

Zeckie opened this issue Mar 15, 2022 · 1 comment · Fixed by #12356
Labels
bug mypy got something wrong

Comments

@Zeckie
Copy link
Zeckie commented Mar 15, 2022

Bug Report

The example of using SupportsLessThan in the documentation does not work in mypy 0.941 or 0.940.

To Reproduce

https://mypy-play.net/?mypy=0.931&python=3.10&gist=6ad43abe09b33cd9dceea02d40c0224d

Works correctly on 0.931, but not 0.941 or 0.940.

@Zeckie Zeckie added the bug mypy got something wrong label Mar 15, 2022
AlexWaygood added a commit to AlexWaygood/mypy that referenced this issue Mar 15, 2022
`SupportsLessThan` was removed from `_typeshed` in python/typeshed#6583 and replaced with a new `SupportsRichComparison` type, which better reflects the types at runtime.

Fixes python#12355
@AlexWaygood
Copy link
Member

We got rid of SupportsLessThan from _typeshed in python/typeshed#6583, because it wasn't doing a great job at describing the various types at runtime it was trying to describe. We replaced it with a new SupportsRichComparison type, which is a little more complicated, but does a much better job at describing the types at runtime.

97littleleaf11 pushed a commit that referenced this issue Mar 15, 2022
`SupportsLessThan` was removed from `_typeshed` in 
python/typeshed#6583 and replaced with 
a new `SupportsRichComparison` type, which better reflects the 
types at runtime.

Fixes #12355
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0