take advantage of all()/any() builtins optimizations

This commit is contained in:
ziirish 2019-05-07 17:36:41 +02:00
parent 384e88d2c6
commit ebf12aa4b5
No known key found for this signature in database
GPG key ID: 72DB229A64B54E46
5 changed files with 53 additions and 55 deletions

View file

@ -85,7 +85,7 @@ class BUIauditLogger(BUIauditLoggerInterface):
'audit/handler.py',
]
for frame in stack:
if any([frame.filename.endswith(x) for x in exclude]):
if any(frame.filename.endswith(x) for x in exclude):
continue
caller = f'{frame.function} [{frame.filename}:{frame.lineno}]'
break