[Updated] D11919: pytype: stop excluding wireprotov2server.py
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Fri Dec 17 11:11:10 UTC 2021
Closed by commit rHGcfb4f1dee978: pytype: stop excluding wireprotov2server.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/D11919?vs=31476&id=31513
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11919/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11919
AFFECTED FILES
mercurial/wireprotov2server.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
@@ -44,7 +44,6 @@
mercurial/wireprotoserver.py # line 253, in _availableapis: No attribute '__iter__' on Callable[[Any, Any], Any] [attribute-error]
mercurial/wireprotov1peer.py # [attribute-error]
mercurial/wireprotov1server.py # BUG?: BundleValueError handler accesses subclass's attrs
-mercurial/wireprotov2server.py # [unsupported-operands], [attribute-error]
TODO: use --no-cache on test server? Caching the files locally helps during
development, but may be a hinderance for CI testing.
@@ -85,7 +84,6 @@
> -x mercurial/wireprotoserver.py \
> -x mercurial/wireprotov1peer.py \
> -x mercurial/wireprotov1server.py \
- > -x mercurial/wireprotov2server.py \
> > $TESTTMP/pytype-output.txt || cat $TESTTMP/pytype-output.txt
Only show the results on a failure, because the output on success is also
diff --git a/mercurial/wireprotov2server.py b/mercurial/wireprotov2server.py
--- a/mercurial/wireprotov2server.py
+++ b/mercurial/wireprotov2server.py
@@ -579,10 +579,12 @@
):
continue
+ # pytype: disable=unsupported-operands
caps[b'commands'][command] = {
b'args': args,
b'permissions': [entry.permission],
}
+ # pytype: enable=unsupported-operands
if entry.extracapabilitiesfn:
extracaps = entry.extracapabilitiesfn(repo, proto)
@@ -608,7 +610,9 @@
if key in target:
entry[key] = target[key]
+ # pytype: disable=attribute-error
caps[b'redirect'][b'targets'].append(entry)
+ # pytype: enable=attribute-error
return proto.addcapabilities(repo, caps)
To: mharbison72, #hg-reviewers, Alphare
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211217/103d8385/attachment-0002.html>
More information about the Mercurial-patches
mailing list