2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-01 14:55:12 +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

@@ -26,7 +26,7 @@ NOTICE_PATH = "NOTICE"
SECTION_RE = re.compile(r"---(\w+)---")
LAYER_RE = re.compile(r"//\sLAYER\s(\d+)")
COMBINATOR_RE = re.compile(r"^([\w.]+)#([0-9a-f]+)\s(?:.*)=\s([\w<>.]+);(?: // Docs: (.+))?$", re.MULTILINE)
ARGS_RE = re.compile("[^{](\w+):([\w?!.<>#]+)")
ARGS_RE = re.compile(r"[^{](\w+):([\w?!.<>#]+)")
FLAGS_RE = re.compile(r"flags\.(\d+)\?")
FLAGS_RE_2 = re.compile(r"flags\.(\d+)\?([\w<>.]+)")
FLAGS_RE_3 = re.compile(r"flags:#")