Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Oct 11, 2024
1 parent 9d8fda0 commit a573d48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyanalyze/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def _type_from_subscripted_value(
ctx.show_error("Optional[] takes only one argument")
return AnyValue(AnySource.error)
return unite_values(KnownValue(None), _type_from_value(members[0], ctx))
elif root is type or root is type:
elif root is typing.Type or root is type:
if len(members) != 1:
ctx.show_error("Type[] takes only one argument")
return AnyValue(AnySource.error)
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ ignore = [
"pyanalyze/test_*.py" = [
"UP", # Want to test old-style code
]
"pyanalyze/annotations.py" = [
"UP006", # Need to refer to typing.Type
]

0 comments on commit a573d48

Please sign in to comment.