mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Use modern typehint syntax
This commit is contained in:
@@ -7,12 +7,11 @@ import ast
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
|
||||
class ImportVisitor(ast.NodeVisitor):
|
||||
def __init__(self) -> None:
|
||||
self.imported_names: List[str] = []
|
||||
self.imported_names: list[str] = []
|
||||
|
||||
def visit_ImportFrom(self, node: ast.ImportFrom) -> None:
|
||||
if node.level == 1:
|
||||
@@ -26,7 +25,7 @@ def main() -> None:
|
||||
rf"(tl|mtproto){re.escape(os.path.sep)}(abcs|functions|types)"
|
||||
)
|
||||
|
||||
files: List[str] = []
|
||||
files: list[str] = []
|
||||
for file in impl_root.rglob("__init__.py"):
|
||||
file_str = str(file)
|
||||
if autogenerated_re.search(file_str):
|
||||
|
Reference in New Issue
Block a user