topic: ask pytype to disable import-error on a block handling hg 4.5
authorAnton Shestakov <av6@dwimlabs.net>
Mon, 09 Dec 2019 19:58:58 +0700
changeset 5041 71cccd216b01
parent 5040 5b0f761fda9c
child 5042 51d0f2355215
topic: ask pytype to disable import-error on a block handling hg 4.5
hgext3rd/topic/discovery.py
--- a/hgext3rd/topic/discovery.py	Mon Dec 09 16:40:53 2019 +0700
+++ b/hgext3rd/topic/discovery.py	Mon Dec 09 19:58:58 2019 +0700
@@ -17,10 +17,11 @@
     compat,
 )
 
+# hg <= 4.5 (b4d85bc122bd)
 try:
-    from mercurial import wireproto
+    from mercurial import wireproto  # pytype: disable=import-error
     wireproto.branchmap
-except (AttributeError, ImportError): # <= hg-4.5
+except (AttributeError, ImportError):
     from mercurial import wireprotov1server as wireproto
 
 def _headssummary(orig, pushop, *args, **kwargs):