Make pyright happy

This commit is contained in:
Lonami Exo
2024-03-16 19:05:58 +01:00
parent 854096e9d3
commit 033b56f1d3
55 changed files with 435 additions and 309 deletions

View File

@@ -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)