# HG changeset patch # User Augie Fackler # Date 1441893137 14400 # Node ID ae65b1b4cb4639412c7837f5c5626fe83e43c009 # Parent a43328baa2ac259264fcc70263f7e53571309e57 import-checker: use modern .endswith for multiple suffixes Suggested by Anton Shestakov on the list. Thanks! diff -r a43328baa2ac -r ae65b1b4cb46 contrib/import-checker.py --- a/contrib/import-checker.py Sat Aug 22 18:43:24 2015 -0700 +++ b/contrib/import-checker.py Thu Sep 10 09:52:17 2015 -0400 @@ -200,11 +200,7 @@ for name in files: if name == '__init__.py': continue - if not (name.endswith('.py') - or name.endswith('.so') - or name.endswith('.pyc') - or name.endswith('.pyo') - or name.endswith('.pyd')): + if not name.endswith(('.py', '.so', '.pyc', '.pyo', '.pyd')): continue full_path = os.path.join(top, name) rel_path = full_path[len(libpath) + 1:]