[Updated] D11249: check-module-imports: ignore non-stdlib module installed by distribution

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Wed Aug 4 20:43:52 UTC 2021


Closed by commit rHG42e2cdb50db0: check-module-imports: ignore non-stdlib module installed by distribution (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11249?vs=29786&id=29798

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11249/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11249

AFFECTED FILES
  contrib/import-checker.py

CHANGE DETAILS

diff --git a/contrib/import-checker.py b/contrib/import-checker.py
--- a/contrib/import-checker.py
+++ b/contrib/import-checker.py
@@ -278,6 +278,8 @@
         ):
             continue
         for top, dirs, files in os.walk(libpath):
+            if 'dist-packages' in top.split(os.path.sep):
+                continue
             for i, d in reversed(list(enumerate(dirs))):
                 if (
                     not os.path.exists(os.path.join(top, d, '__init__.py'))



To: marmoute, #hg-reviewers, pulkit, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210804/ebe030fe/attachment-0002.html>


More information about the Mercurial-patches mailing list