import-checker: use modern .endswith for multiple suffixes
Suggested by Anton Shestakov <engored@ya.ru> on the list. Thanks!
--- 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:]