HomePhabricator

pytype: stop excluding statprof.py

Authored by mharbison72.

Description

pytype: stop excluding statprof.py

This seems to have worked fine before (at least on Linux). We could just add
suppression comments, but this file already imports from the mercurial package,
which seems to prevent this from running as a standalone program because of the
relative import of pycompat. PyCharm isn't happy either way.

File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 501, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 1091, in main
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 501, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 431, in profile
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 522, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 1091, in main
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 522, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 431, in profile
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 523, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 1091, in main
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 523, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 431, in profile
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 524, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 1091, in main
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 524, in display:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)
Called from (traceback):
  line 431, in profile
File "/mnt/c/Users/Matt/hg/mercurial/statprof.py", line 796, in _write:
    Function TextIO.write was called with the wrong arguments [wrong-arg-types]
         Expected: (self, s: str)
  Actually passed: (self, s: bytes)

Differential Revision: https://phab.mercurial-scm.org/D11921

Details

Committed
mharbison72Dec 13 2021, 7:34 PM
Differential Revision
D11921: pytype: stop excluding statprof.py
Parents
rHGc1fe758c1530: statprof: convert a few exception byte strings to str
Branches
Unknown
Tags
Unknown