check: check modules in hgdemandimport

A few places only check modules in mercurial and hgext. Add
hgdemandimport to the list in those places.
This commit is contained in:
Siddharth Agarwal 2017-05-21 13:44:26 -07:00
parent a41c665cd6
commit 1ce1a31421
3 changed files with 6 additions and 5 deletions

View File

@ -51,9 +51,10 @@ def check_compat_py3(f):
return
# Try to import the module.
# For now we only support mercurial.* and hgext.* modules because figuring
# out module paths for things not in a package can be confusing.
if f.startswith(('hgext/', 'mercurial/')) and not f.endswith('__init__.py'):
# For now we only support modules in packages because figuring out module
# paths for things not in a package can be confusing.
if (f.startswith(('hgdemandimport/', 'hgext/', 'mercurial/'))
and not f.endswith('__init__.py')):
assert f.endswith('.py')
name = f.replace('/', '.')[:-3]
try:

View File

@ -23,6 +23,6 @@
Check if ":hg:`help TOPIC`" is valid:
(use "xargs -n1 -t" to see which help commands are executed)
$ hg files 'glob:{hgext,mercurial}/**/*.py' | sed 's|\\|/|g' \
$ hg files 'glob:{hgdemandimport,hgext,mercurial}/**/*.py' | sed 's|\\|/|g' \
> | xargs python "$TESTTMP/scanhelptopics.py" \
> | xargs -n1 hg help > /dev/null

View File

@ -12,7 +12,7 @@ Current checks:
$ touch $TESTTMP/fakerc
$ pylint --rcfile=$TESTTMP/fakerc --disable=all \
> --enable=W0102 --reports=no \
> mercurial hgext hgext3rd
> mercurial hgdemandimport hgext hgext3rd
(?)
------------------------------------ (?)
Your code has been rated at 10.00/10 (?)