[Updated] D11927: pytype: stop excluding procutil.py
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Fri Dec 17 11:12:00 UTC 2021
Closed by commit rHG333a2656e981: pytype: stop excluding procutil.py (authored by mharbison72).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11927?vs=31492&id=31520
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11927/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11927
AFFECTED FILES
mercurial/utils/procutil.py
tests/test-check-pytype.t
CHANGE DETAILS
diff --git a/tests/test-check-pytype.t b/tests/test-check-pytype.t
--- a/tests/test-check-pytype.t
+++ b/tests/test-check-pytype.t
@@ -32,7 +32,6 @@
mercurial/testing/storage.py # tons of [attribute-error]
mercurial/ui.py # [attribute-error], [wrong-arg-types]
mercurial/unionrepo.py # ui, svfs, unfiltered [attribute-error]
-mercurial/utils/procutil.py # [attribute-error], [module-attr], [bad-return-type]
mercurial/utils/memorytop.py # not 3.6 compatible
mercurial/win32.py # [not-callable]
mercurial/wireprotoframing.py # [unsupported-operands], [attribute-error], [import-error]
@@ -68,7 +67,6 @@
> -x mercurial/thirdparty \
> -x mercurial/ui.py \
> -x mercurial/unionrepo.py \
- > -x mercurial/utils/procutil.py \
> -x mercurial/utils/memorytop.py \
> -x mercurial/win32.py \
> -x mercurial/wireprotoframing.py \
diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py
--- a/mercurial/utils/procutil.py
+++ b/mercurial/utils/procutil.py
@@ -75,7 +75,9 @@
return res
+# pytype: disable=attribute-error
io.BufferedIOBase.register(LineBufferedWrapper)
+# pytype: enable=attribute-error
def make_line_buffered(stream):
@@ -114,7 +116,9 @@
return total_written
+# pytype: disable=attribute-error
io.IOBase.register(WriteAllWrapper)
+# pytype: enable=attribute-error
def _make_write_all(stream):
@@ -767,6 +771,7 @@
raise
finally:
if stdin_bytes is not None:
+ assert not isinstance(stdin, int)
stdin.close()
if not ensurestart:
# Even though we're not waiting on the child process,
To: mharbison72, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211217/a2fbf817/attachment-0002.html>
More information about the Mercurial-patches
mailing list