Mercurial > public > mercurial-scm > hg-stable
diff hgext/git/gitutil.py @ 49931: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 | 227124098e14 |
children | f4733654f144 |
line wrap: on
line diff
--- a/hgext/git/gitutil.py Thu Jan 05 00:09:48 2023 -0500 +++ b/hgext/git/gitutil.py Fri Jan 06 13:04:50 2023 -0500 @@ -9,7 +9,7 @@ global pygit2_module if pygit2_module is None: try: - import pygit2 as pygit2_module + import pygit2 as pygit2_module # pytype: disable=import-error pygit2_module.InvalidSpecError except (ImportError, AttributeError):