pytype: add coverage for hgdemandimport
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 04 Jan 2023 17:15:19 -0500
changeset 49929 31bbf7a28a75
parent 49928 fda5a4b853ab
child 49930 139f713010ea
pytype: add coverage for hgdemandimport This would have flagged what needed fixing in 48e38b179106 long ago.
contrib/check-pytype.sh
hgdemandimport/demandimportpy3.py
--- 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):