There was an error while loading. Please reload this page.
1 parent e8250bd commit 82b029cCopy full SHA for 82b029c
2 files changed
compiler/api/compiler.py
@@ -115,7 +115,7 @@ def get_type_hint(type: str) -> str:
115
type = f"List[{get_type_hint(sub_type)}]"
116
117
if is_core:
118
- return f"Union[None, {type}] = None" if is_flag else type
+ return f"Optional[{type}] = None" if is_flag else type
119
else:
120
ns, name = type.split(".") if "." in type else ("", type)
121
type = f'"raw.base.' + ".".join([ns, name]).strip(".") + '"'
compiler/api/template/combinator.txt
@@ -5,7 +5,7 @@ from io import BytesIO
5
from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
6
from pyrogram.raw.core import TLObject
7
from pyrogram import raw
8
-from typing import List, Union, Any
+from typing import List, Optional, Any
9
10
{warning}
11
0 commit comments