Matt Harbison <matt_harbison@yahoo.com> [Fri, 06 Jan 2023 12:20:09 -0500] rev 49859
remotefilelog: byteify the message for a few StorageErrors
Flagged by pytype locally.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:38:14 -0500] rev 49858
histedit: byteify the help for the multifold action
While there's some allowance for str in `_()`, it's commented to be for "goofy
unicode docstrings in test", so no idea how well that works, but it should at
least come back as bytes. With HGPLAIN, however, the str isn't touched and is
returned as-is, so this seems like a real bug.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:31:11 -0500] rev 49857
typing: disable a few incorrect warnings in pywatchman
The module-attr warnings are for things that only exist on Windows, and the
wrong-keyword-args warning is due to a special case for a specific constructor.
Both of these are properly conditionalized.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:28:33 -0500] rev 49856
watchman: refactor transport connecting to unconfuse pytype
Pytype sees `self.proc` as potentially `None` here, even though it's set by the
`_connect()` logic. Instead of asserting, simply use the process returned by
that method (which it sets into `self.proc` before returning, so there's no
functional change here).
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:24:11 -0500] rev 49855
watchman: refactor `ctypes.windll.kernel32` references to a local variable
This is flagged by pytype as an attribute-error, and it's easier to disable that
in a single place.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:21:09 -0500] rev 49854
typing: disable [unsupported-operands] warning in the largefiles outgoing hook
For some reason, pytype thinks `toupload` is a set:
No attribute '__setitem__' on Set[nothing]
(It actually is a set in the subsequent `else` branch, but I'm not interested in
trying to rewrite this to be consistent.)
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:15:27 -0500] rev 49853
typing: add some assertions that a variable isn't None
In the case of blackbox, there's a default limit if one isn't explicitly
supplied. For the monotone regex, neither group is optional, so a match means
it's not None.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 05 Jan 2023 17:09:41 -0500] rev 49852
largefiles: reference `mercurial.configitems.dynamicdefault` directly
Pytype was unable to see `dynamicdefault` on `eh.configitem`. This is clearer
anyway.