2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-10 11:15:27 +00:00

Some fixes and speed improvments (#439)

* Use raw string for re pattern

* Trim trailing whitespaces from docstrings and code

* Use isinstance() instead of type() for typechecking

* Remove unused imports
This commit is contained in:
Alisson Lauffer
2020-07-12 01:43:30 -03:00
committed by GitHub
parent 5261e9550e
commit 531069b1e2
18 changed files with 28 additions and 43 deletions

View File

@@ -1649,7 +1649,7 @@ class Client(Methods, BaseClient):
try:
return self.storage.get_peer_by_id(peer_id)
except KeyError:
if type(peer_id) is str:
if isinstance(peer_id, str):
if peer_id in ("self", "me"):
return types.InputPeerSelf()