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

QLocale.toString: the format parameter is an int instead of str for floating values

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.8.0.2
    • Type hints
    • None

    Description

      A particular overload should be

      def toString(self, f: float, /, format: typing.Literal["e", "E", "f", "F", "g", "G"] = ..., precision: int = ...) -> str: ...
      

      instead of

      def toString(self, f: float, /, format: int = ..., precision: int = ...) -> str: ...
      

      That would explicitly read that the format is a single letter, one of “e”, “E”, “f”, “F”, “g”, and “G”.


      I haven't tested all the available versions. 6.8 and 6.9 are affected. If I remember right, the issue appears in all the versions.

      Attachments

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

        Activity

          People

            ctismer Christian Tismer
            stsav012 Anton Yablokov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes