diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -35,6 +35,8 @@ 'mercurial.pure.mpatch', 'mercurial.pure.osutil', 'mercurial.pure.parsers', + # third-party imports should be directly imported + 'mercurial.thirdparty', ) # Whitelist of symbols that can be directly imported. diff --git a/tests/test-check-code.t b/tests/test-check-code.t --- a/tests/test-check-code.t +++ b/tests/test-check-code.t @@ -7,9 +7,11 @@ New errors are not allowed. Warnings are strongly discouraged. (The writing "no-che?k-code" is for not skipping this file when checking.) - $ testrepohg locate -X contrib/python-zstandard \ - > -X hgext/fsmonitor/pywatchman | - > sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false + $ testrepohg locate \ + > -X contrib/python-zstandard \ + > -X hgext/fsmonitor/pywatchman \ + > -X mercurial/thirdparty \ + > | sed 's-\\-/-g' | "$check_code" --warnings --per-file=0 - || false Skipping i18n/polib.py it has no-che?k-code (glob) Skipping mercurial/httpclient/__init__.py it has no-che?k-code (glob) Skipping mercurial/httpclient/_readers.py it has no-che?k-code (glob) diff --git a/tests/test-check-module-imports.t b/tests/test-check-module-imports.t --- a/tests/test-check-module-imports.t +++ b/tests/test-check-module-imports.t @@ -25,6 +25,7 @@ > -X doc/gendoc.py \ > -X doc/hgmanpage.py \ > -X i18n/posplit \ + > -X mercurial/thirdparty \ > -X tests/hypothesishelpers.py \ > -X tests/test-commit-interactive.t \ > -X tests/test-contrib-check-code.t \ diff --git a/tests/test-check-pylint.t b/tests/test-check-pylint.t --- a/tests/test-check-pylint.t +++ b/tests/test-check-pylint.t @@ -12,6 +12,7 @@ $ touch $TESTTMP/fakerc $ pylint --rcfile=$TESTTMP/fakerc --disable=all \ > --enable=W0102 --reports=no \ + > --ignore=thirdparty \ > mercurial hgdemandimport hgext hgext3rd (?) ------------------------------------ (?)