Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Nov 2019 11:53:47 -0800] rev 43691
black: blacken scripts
These scripts weren't blackened. I found these as part of adding
script checking to test-check-format.t.
# skip-blame black
Differential Revision: https://phab.mercurial-scm.org/D7446
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Nov 2019 11:59:22 -0800] rev 43690
doc: don't use mutable default arguments
It appears our mutable default arguments checker doesn't find
arguments not on the first line of a function definition :(
The arguments aren't used, so the default value is irrelevant.
I found this when blackening this script in a future commit.
Differential Revision: https://phab.mercurial-scm.org/D7445
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 21:58:36 -0800] rev 43689
tags: don't check for clean files when checking for dirty working copy
We didn't request status for clean files so there should never be any
entries in the list of clean files (at least not since
dd773340a085),
but it's misleading to check the list.
Differential Revision: https://phab.mercurial-scm.org/D7428
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 21:13:46 -0800] rev 43688
branchmap: make "closed" a set from beginning instead of converting from list
Differential Revision: https://phab.mercurial-scm.org/D7427
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 Nov 2019 01:34:52 -0500] rev 43687
debugextensions: gracefully handle missing __file__ attributes
This was crashing PyOxidizer.
Differential Revision: https://phab.mercurial-scm.org/D7452
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 Nov 2019 01:00:06 -0500] rev 43686
debuginstall: gracefully handle missing __file__ attributes
This was crashing PyOxidizer. While here, point "Python lib" and "installed
modules" to the oxidized binary when read from memory instead of pretending
their location is unknown.
Differential Revision: https://phab.mercurial-scm.org/D7451
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 16:25:28 +0900] rev 43685
typing: add pseudo localstr.__init__() to help pytype
Apparently, pytype failed to parse localstr.__new__()? This fixes the
following errors:
line 126, in __hash__: No attribute '_utf8' on localstr [attribute-error]
line 188, in tolocal: Function localstr.__init__ was called with the wrong
arguments [wrong-arg-types]
Expected: (self, string: str, ...)
Actually passed: (self, string: bytes, ...)
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 15:24:49 +0900] rev 43684
typing: fix argument type of encoding.localstr()
It takes both utf-8 and local strings in bytes type.
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 16:09:39 +0900] rev 43683
typing: suppress error of py2 encoding.strtolocal() and .strfromlocal()
I don't know how to conditionally get rid of these py2/py3 overloads from
.pyi file. Instead, this patch makes pytype ignore the false-positives:
line 271, in strtolocal: bad option in return type [bad-return-type]
Expected: bytes
Actually returned: str
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 15:34:47 +0900] rev 43682
typing: constrain argument/return types of encoding.toutf8b()