We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d7258d commit a23c122Copy full SHA for a23c122
discord_markdown_ast_parser/__init__.py
@@ -1,10 +1,10 @@
1
-from typing import Any, Dict, List, Optional
+from typing import Any, Dict, List, Union
2
3
from .lexer import lex, Lexing
4
from .parser import Node, parse_tokens
5
6
7
-def lexing_list_convert(lexing: Lexing) -> List[Lexing]:
+def lexing_list_convert(lexing: Union[List[Lexing], Lexing]) -> List[Lexing]:
8
if not isinstance(lexing, list):
9
lexing = [lexing]
10
return [Lexing(item) if isinstance(item, str) else item for item in lexing]
0 commit comments