mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
Literal could be imported from typing_extensions too (#375)
Co-authored-by: Germán Méndez Bravo <kronuz@fb.com>
This commit is contained in:
parent
825931acd6
commit
6f915ab39b
1 changed files with 1 additions and 1 deletions
|
|
@ -739,7 +739,7 @@ class ScopeVisitor(cst.CSTVisitor):
|
|||
|
||||
def visit_Subscript(self, node: cst.Subscript) -> Optional[bool]:
|
||||
if any(
|
||||
qn.name == "typing.Literal"
|
||||
qn.name in ("typing.Literal", "typing_extensions.Literal")
|
||||
for qn in self.scope.get_qualified_names_for(node.value)
|
||||
):
|
||||
node.value.visit(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue