Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1945

Fix mypy issues following the update to mypy 0.740

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.4.0
    • Component/s: Framework

      Description

      Mypy is getting better and better, and the last update found new issues:

      >>> Checking type annotations
      nxdrive/client/remote_client.py:336: error: No overload variant of "write" of "BinaryIO" matches argument type "memoryview"
      nxdrive/client/remote_client.py:336: note: Possible overload variants:
      nxdrive/client/remote_client.py:336: note:     def write(self, s: bytearray) -> int
      nxdrive/client/remote_client.py:336: note:     def write(self, s: bytes) -> int
      nxdrive/manager.py:636: error: Incompatible return value type (got "Optional[str]", expected "str")
      nxdrive/commandline.py:574: error: On Python 3 '{}'.format(b'abc') produces "b'abc'"; use !r if this is a desired behavior
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m