Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2408

Pyright doesn't recognize that QDate can be ordered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5.1.1
    • PySide
    • None
    • Linux/Wayland

    Description

      My LSP, pyright, cannot conclude that calls to functions like max or expressions comparing two QDate s like start < end are possible since it thinks QDate s are not comparable. Some example error messages are:

      Argument of type "QDate" cannot be assigned to parameter "__arg1" of type "SupportsLessThanT@min" in function "min"
           Type "SupportsLessThan" cannot be assigned to type "QDate"
      
      Operator ">" not supported for types "QDate" and "QDate"
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              ayhon Fernando Leal
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes