Mercurial > public > mercurial-scm > hg
comparison mercurial/url.py @ 50923: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 | d718eddf01d9 |
comparison
equal
deleted
inserted
replaced
50922:13eab1a5db78 | 50923:bc9c9ed0659d |
---|---|
539 # an HTTPS URL, we'll likely fail due to unknown protocol. | 539 # an HTTPS URL, we'll likely fail due to unknown protocol. |
540 | 540 |
541 else: | 541 else: |
542 handlers.append(httphandler(timeout=timeout)) | 542 handlers.append(httphandler(timeout=timeout)) |
543 if has_https: | 543 if has_https: |
544 handlers.append(httpshandler(ui, timeout=timeout)) | 544 # pytype get confused about the conditional existence for httpshandler here. |
545 handlers.append( | |
546 httpshandler(ui, timeout=timeout) # pytype: disable=name-error | |
547 ) | |
545 | 548 |
546 handlers.append(proxyhandler(ui)) | 549 handlers.append(proxyhandler(ui)) |
547 | 550 |
548 passmgr = passwordmgr(ui, ui.httppasswordmgrdb) | 551 passmgr = passwordmgr(ui, ui.httppasswordmgrdb) |
549 if authinfo is not None: | 552 if authinfo is not None: |