Skip to content

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

Closed

Description

@Zeckie

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.

Activity

  1. added a commit that references this issue on Mar 15, 2022
    ee11c81
  2. AlexWaygood commented on Mar 15, 2022

    @AlexWaygood
    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.

  3. added a commit that references this issue on Mar 15, 2022
    b09683c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions