mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
check-ext: ignore pyc files
`.pyc` files could cause false positive. Scan `.py` and `.pyx` files explicitly. Test Plan: Make sure `uncommit.pyc` will not break check-code but `uncommit.pyx`, `uncommit.py` will. Differential Revision: https://phab.mercurial-scm.org/D1283
This commit is contained in:
parent
47b9325724
commit
09af39ffe1
@ -19,7 +19,9 @@ foreignextre = re.compile(r'(%s)' % '|'.join(foreignexts))
|
||||
|
||||
# extensions in this repo
|
||||
repoexts = set(os.path.basename(p).split('.')[0]
|
||||
for p in glob('hgext3rd/*.py*') if '__' not in p)
|
||||
for p in glob('hgext3rd/*.py') if '__' not in p)
|
||||
repoexts.update(os.path.basename(p).split('.')[0]
|
||||
for p in glob('hgext3rd/*.pyx'))
|
||||
repoexts.update(os.path.basename(os.path.dirname(p))
|
||||
for p in glob('hgext3rd/*/__init__.py'))
|
||||
repoexts.update(os.path.basename(os.path.dirname(p))
|
||||
|
Loading…
Reference in New Issue
Block a user