pytype: add coverage for hgdemandimport
This would have flagged what needed fixing in
48e38b179106 long ago.
--- a/contrib/check-pytype.sh Fri Dec 16 17:46:20 2022 +0100
+++ b/contrib/check-pytype.sh Wed Jan 04 17:15:19 2023 -0500
@@ -42,7 +42,7 @@
# TODO: include hgext and hgext3rd
-pytype -V 3.7 --keep-going --jobs auto doc/check-seclevel.py mercurial \
+pytype -V 3.7 --keep-going --jobs auto doc/check-seclevel.py hgdemandimport mercurial \
-x mercurial/bundlerepo.py \
-x mercurial/context.py \
-x mercurial/crecord.py \
--- a/hgdemandimport/demandimportpy3.py Fri Dec 16 17:46:20 2022 +0100
+++ b/hgdemandimport/demandimportpy3.py Wed Jan 04 17:15:19 2023 -0500
@@ -37,6 +37,8 @@
the ignore list.
"""
+ _HAS_DYNAMIC_ATTRIBUTES = True # help pytype not flag self.loader
+
def exec_module(self, module):
"""Make the module load lazily."""
with tracing.log('demandimport %s', module):