Tue, 14 Dec 2021 19:13:30 -0500 pytype: stop excluding wireprotoserver.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 19:13:30 -0500] rev 48490
pytype: stop excluding wireprotoserver.py The `config` entry is a 2 part tuple, which has `__iter__()`: File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 253, in _availableapis: No attribute '__iter__' on Callable[[Any, Any], Any] [attribute-error] In Union[Callable[[Any, Any, Any, Any, Any], None], Callable[[Any, Any], Any]] File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 253, in _availableapis: No attribute '__iter__' on Callable[[Any, Any, Any, Any, Any], None] [attribute-error] In Union[Callable[[Any, Any, Any, Any, Any], None], Callable[[Any, Any], Any]] Differential Revision: https://phab.mercurial-scm.org/D11930
Tue, 14 Dec 2021 18:36:07 -0500 pytype: stop excluding pycompat.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 18:36:07 -0500] rev 48489
pytype: stop excluding pycompat.py Whatever issues were here seem to have been previously fixed. Differential Revision: https://phab.mercurial-scm.org/D11929
Tue, 14 Dec 2021 17:29:30 -0500 procutil: avoid an uninitialized variable usage on tempfile exception
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:29:30 -0500] rev 48488
procutil: avoid an uninitialized variable usage on tempfile exception If `pycompat.unnamedtempfile()` raises an exception, it would have called `stdin.close()` in the `finally` block without it being initialized first. Differential Revision: https://phab.mercurial-scm.org/D11928
Tue, 14 Dec 2021 17:25:46 -0500 pytype: stop excluding procutil.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:25:46 -0500] rev 48487
pytype: stop excluding procutil.py This avoids these false warnings: File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 78, in <module>: No attribute 'register' on Type[io.BufferedIOBase] [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 117, in <module>: No attribute 'register' on Type[io.IOBase] [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 770, in runbgcommandpy3: No attribute 'close' on int [attribute-error] In Union[IO[Union[bytes, str]], int] Differential Revision: https://phab.mercurial-scm.org/D11927
Tue, 14 Dec 2021 17:06:32 -0500 pytype: stop excluding chgserver.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Dec 2021 17:06:32 -0500] rev 48486
pytype: stop excluding chgserver.py This teaches pytype about some lazy initialization, and avoids the following: File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 666, in _checkextensions: No attribute '_hashstate' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 672, in _checkextensions: No attribute '_hashstate' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 677, in _bind: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 683, in _bind: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 686, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 686, in _createsymlink: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 688, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 689, in _createsymlink: No attribute '_realaddress' on chgunixservicehandler [attribute-error] File "/mnt/c/Users/Matt/hg/mercurial/chgserver.py", line 690, in _createsymlink: No attribute '_baseaddress' on chgunixservicehandler [attribute-error] Differential Revision: https://phab.mercurial-scm.org/D11926
Mon, 13 Dec 2021 22:46:43 -0500 pytype: stop excluding webcommands.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 22:46:43 -0500] rev 48485
pytype: stop excluding webcommands.py I have no idea why, but asserting that each value added to `emptydirs` is not None didn't fix this: File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 621, in dirlist: Function bytes.join was called with the wrong arguments [wrong-arg-types] Expected: (self, iterable: Iterable[bytes]) Actually passed: (self, iterable: List[None]) Differential Revision: https://phab.mercurial-scm.org/D11924
Mon, 13 Dec 2021 20:45:31 -0500 tests: drop an obsolete comment about a pytype failure
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 20:45:31 -0500] rev 48484
tests: drop an obsolete comment about a pytype failure Differential Revision: https://phab.mercurial-scm.org/D11923
Mon, 13 Dec 2021 20:19:09 -0500 pytype: stop excluding patch.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 20:19:09 -0500] rev 48483
pytype: stop excluding patch.py The underlying `email.generator.BytesGenerator` is documented as requiring an `fp` that accepts bytes, so I'm not sure why pytype is getting confused: File "/mnt/c/Users/Matt/hg/mercurial/patch.py", line 112, in msgfp: Function Generator.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, outfp: TextIO, ...) Actually passed: (self, outfp: io.BytesIO, ...) Differential Revision: https://phab.mercurial-scm.org/D11922
Mon, 13 Dec 2021 19:34:06 -0500 pytype: stop excluding statprof.py
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 19:34:06 -0500] rev 48482
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
Mon, 13 Dec 2021 17:59:36 -0500 statprof: convert a few exception byte strings to str
Matt Harbison <matt_harbison@yahoo.com> [Mon, 13 Dec 2021 17:59:36 -0500] rev 48481
statprof: convert a few exception byte strings to str That way these display without the b'' prefix. Differential Revision: https://phab.mercurial-scm.org/D11920
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip