Mercurial > hg-stable
changeset 51785:587153c96fe3
phabricator: correct the default value of `phabhunk.corpus`
There's only one caller to this constructor (which does provide this argument),
and no direct assignments, so there's no runtime bug here. However, when pytype
is tricked into using the standard `attr` package instead of the vendored
version, it flags this because bytes is passed to the one constructor
invocation.
Tricking pytype into using the standard package will generate many more type
hints, noteably around `@attr.s` decorated things.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 23 Jul 2024 19:01:16 -0400 |
parents | bbe59cc5d2e1 |
children | a65c2dddbf5d |
files | hgext/phabricator.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/phabricator.py Mon Jul 22 18:20:29 2024 +0200 +++ b/hgext/phabricator.py Tue Jul 23 19:01:16 2024 -0400 @@ -698,7 +698,7 @@ oldLength = attr.ib(default=0) # camelcase-required newOffset = attr.ib(default=0) # camelcase-required newLength = attr.ib(default=0) # camelcase-required - corpus = attr.ib(default='') + corpus = attr.ib(default=b'') # These get added to the phabchange's equivalents addLines = attr.ib(default=0) # camelcase-required delLines = attr.ib(default=0) # camelcase-required