mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Make pyright happy
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Scan the `client/` directory for __init__.py files.
|
||||
For every depth-1 import, add it, in order, to the __all__ variable.
|
||||
"""
|
||||
|
||||
import ast
|
||||
import os
|
||||
import re
|
||||
@@ -25,7 +26,7 @@ def main() -> None:
|
||||
rf"(tl|mtproto){re.escape(os.path.sep)}(abcs|functions|types)"
|
||||
)
|
||||
|
||||
files = []
|
||||
files: List[str] = []
|
||||
for file in impl_root.rglob("__init__.py"):
|
||||
file_str = str(file)
|
||||
if autogenerated_re.search(file_str):
|
||||
@@ -52,6 +53,8 @@ def main() -> None:
|
||||
+ "]\n"
|
||||
]
|
||||
break
|
||||
case _:
|
||||
pass
|
||||
|
||||
with file.open("w", encoding="utf-8", newline="\n") as fd:
|
||||
fd.writelines(lines)
|
||||
|
Reference in New Issue
Block a user