# HG changeset patch # User Pierre-Yves David # Date 2023-09-01 14:36:13 # Node ID bc9c9ed0659d0b97766113b70ed1bef8db01dc32 # Parent 13eab1a5db7827a59239e771249605367eb311e7 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. diff --git a/mercurial/url.py b/mercurial/url.py --- a/mercurial/url.py +++ b/mercurial/url.py @@ -541,7 +541,10 @@ def opener( 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))