Mercurial > hg
diff hgext/convert/bzr.py @ 49849:de9ffb82ef4d
typing: suppress a bunch of potential import-error cases in extensions
As flagged by pytype locally. Either the ImportError is locally handled, or the
imported module was previously determined to be present by `hgave` (for the
phabricator extension), or is handled by the `hgext.convert.subversion` module
when imported (for the `hgext.convert.transport` module).
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 06 Jan 2023 13:04:50 -0500 |
parents | 5f22c92dcf3d |
children | 1bd33932713d |
line wrap: on
line diff
--- a/hgext/convert/bzr.py Thu Jan 05 00:09:48 2023 -0500 +++ b/hgext/convert/bzr.py Fri Jan 06 13:04:50 2023 -0500 @@ -31,11 +31,14 @@ try: # bazaar imports + # pytype: disable=import-error import breezy.bzr.bzrdir import breezy.errors import breezy.revision import breezy.revisionspec + # pytype: enable=import-error + bzrdir = breezy.bzr.bzrdir errors = breezy.errors revision = breezy.revision