Skip to content

Commit

Permalink
Allow x = ... for x: Any = ...
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 341931368
  • Loading branch information
martindemello authored and rchen152 committed Nov 12, 2020
1 parent ca6a619 commit b964b6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytype/tests/py3/test_typing.py
Expand Up @@ -382,6 +382,7 @@ def func7(a: MySpecialA) -> A:
func7(my_special_a)
""")
self.assertTypesMatchPytd(ty, """
from typing import Any
class A(object):
pass
class MyInt(int):
Expand All @@ -394,7 +395,7 @@ class MyStr1(str):
def __init__(self, val: str): ...
class MyStr2(str):
def __init__(self, val: str): ...
MyAnyType = ... # Any
MyAnyType = ... # type: Any
class MyFunnyNameType(str):
def __init__(self, val:str): ...
def func1(i: MyInt) -> MyInt: ...
Expand Down

0 comments on commit b964b6a

Please sign in to comment.