changeset 50949:bc9c9ed0659d

url: ignore some future pytype error As soon as we start using the builtins `hasattr` function, pytype will start getting confused about which types are available or not. So we ignore this error beforehand.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Sep 2023 16:36:13 +0200
parents 13eab1a5db78
children 7a8ea1397816
files mercurial/url.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/url.py	Fri Sep 01 16:35:05 2023 +0200
+++ b/mercurial/url.py	Fri Sep 01 16:36:13 2023 +0200
@@ -541,7 +541,10 @@
     else:
         handlers.append(httphandler(timeout=timeout))
         if has_https:
-            handlers.append(httpshandler(ui, timeout=timeout))
+            # pytype get confused about the conditional existence for httpshandler here.
+            handlers.append(
+                httpshandler(ui, timeout=timeout)  # pytype: disable=name-error
+            )
 
     handlers.append(proxyhandler(ui))