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

QObject.tr() function parameters is not consistent with python stubs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.15.0
    • PySide
    • None
    • 2a5f0854efdf27ce70ffe569e97d3bcbfcc8e1c8 (pyside/pyside-setup/dev)

    Description

      The QObject.tr() function takes str parameters but the stubs defines it as bytes. This leads to mypy error: Argument 1 to "tr" of "QObject" has incompatible type "str"; expected "bytes"

      According to the documentation, the function should indeed takes str, even though the C++ tr() function takes const char*.

      Attachments

        Issue Links

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

          Activity

            People

              ctismer Christian Tismer
              alg Aurélien Le Gentil
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes