changeset 5041:71cccd216b01

topic: ask pytype to disable import-error on a block handling hg 4.5
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 09 Dec 2019 19:58:58 +0700
parents 5b0f761fda9c
children 51d0f2355215
files hgext3rd/topic/discovery.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):