diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-12-19 22:52:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-19 22:52:27 (GMT) |
commit | 2c6e50bf0ffa0c272d650a2f0ad76867d82d54e4 (patch) | |
tree | f6bbc00b04177db6a303f2345ec5df29193475ed /SCons/Util.py | |
parent | dbca6ec6eb8f331505787326ffd60a4ade5e8ba7 (diff) | |
parent | 2cf7b802bf0a5f3c2716edb5da20cc54b8fe720b (diff) | |
download | SCons-2c6e50bf0ffa0c272d650a2f0ad76867d82d54e4.zip SCons-2c6e50bf0ffa0c272d650a2f0ad76867d82d54e4.tar.gz SCons-2c6e50bf0ffa0c272d650a2f0ad76867d82d54e4.tar.bz2 |
Merge pull request #4076 from SergBobrovsky/patch-3
Update Util.py
Diffstat (limited to 'SCons/Util.py')
-rw-r--r-- | SCons/Util.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/SCons/Util.py b/SCons/Util.py index d486867..6a0f8ac 100644 --- a/SCons/Util.py +++ b/SCons/Util.py @@ -70,17 +70,11 @@ else: # (Yeah, yeah, YAGNI...) def containsAny(s, pat) -> bool: """Check whether string `s` contains ANY of the items in `pat`.""" - for c in pat: - if c in s: - return True - return False + return any(c in s for c in pat) def containsAll(s, pat) -> bool: """Check whether string `s` contains ALL of the items in `pat`.""" - for c in pat: - if c not in s: - return False - return True + return all(c in s for c in pat) def containsOnly(s, pat) -> bool: """Check whether string `s` contains ONLY items in `pat`.""" |