diff options
Diffstat (limited to 'astroid/modutils.py')
-rw-r--r-- | astroid/modutils.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py index 4e6f918f..df75a901 100644 --- a/astroid/modutils.py +++ b/astroid/modutils.py @@ -679,10 +679,7 @@ def _is_python_file(filename): .pyc and .pyo are ignored """ - for ext in (".py", ".so", ".pyd", ".pyw"): - if filename.endswith(ext): - return True - return False + return filename.endswith((".py", ".so", ".pyd", ".pyw")) def _has_init(directory): |