Replace redundant isinstance calls with a tuple parameter

This commit is contained in:
Lonami Exo
2017-10-13 11:38:12 +02:00
parent db63b5e39a
commit 4fd9d361f0
5 changed files with 17 additions and 23 deletions

View File

@@ -74,9 +74,7 @@ class EntityDatabase:
getattr(p, 'access_hash', 0) # chats won't have hash
if self.enabled_full:
if isinstance(e, User) \
or isinstance(e, Chat) \
or isinstance(e, Channel):
if isinstance(e, (User, Chat, Channel)):
new.append(e)
except ValueError:
pass