summaryrefslogtreecommitdiff
path: root/astroid/modutils.py
diff options
context:
space:
mode:
authorNick Drozd <nicholasdrozd@gmail.com>2021-11-27 10:25:01 -0500
committerGitHub <noreply@github.com>2021-11-27 16:25:01 +0100
commit813aab5069f55eebf501ea000a46fc39a09956a8 (patch)
tree54a68b31e346165c75c9e89b7cf76e288319ccb1 /astroid/modutils.py
parent47e860f7d5c73d53de77e7c450535e709e5ef99e (diff)
downloadastroid-git-813aab5069f55eebf501ea000a46fc39a09956a8.tar.gz
Upgrade to pylint 2.12 and enable ``for_any_all`` checker (#1277)
* Enable for_any_all check * Upgrade to pylint 2.12 in pre-commit configuration * Fix new Pylint warnings * Upgrade the regex for Mixin Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'astroid/modutils.py')
-rw-r--r--astroid/modutils.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py
index e39c6813..ef8b39da 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -555,10 +555,8 @@ def is_standard_module(modname, std_path=None):
return False
if std_path is None:
std_path = STD_LIB_DIRS
- for path in std_path:
- if filename.startswith(_cache_normalize_path(path)):
- return True
- return False
+
+ return any(filename.startswith(_cache_normalize_path(path)) for path in std_path)
def is_relative(modname, from_file):