File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ a = None # type: A
421
421
422
422
def ff() -> None:
423
423
x = f() # E: Need type annotation for variable
424
- reveal_type(x)
424
+ reveal_type(x) # E: Revealed type is 'Any'
425
425
426
426
g(None) # Ok
427
427
f() # Ok because not used to infer local variable type
@@ -1953,7 +1953,7 @@ T = TypeVar('T')
1953
1953
def f() -> T: pass
1954
1954
1955
1955
class C:
1956
- x = f()
1956
+ x = f() # E: Need type annotation for variable
1957
1957
def m(self) -> str:
1958
1958
return 42 # E: Incompatible return value type (got "int", expected "str")
1959
1959
@@ -1970,7 +1970,7 @@ T = TypeVar('T')
1970
1970
def f(x: Optional[T] = None) -> T: pass
1971
1971
1972
1972
class C:
1973
- x = f()
1973
+ x = f() # E: Need type annotation for variable
1974
1974
def m(self) -> str:
1975
1975
return 42 # E: Incompatible return value type (got "int", expected "str")
1976
1976
@@ -1986,7 +1986,7 @@ T = TypeVar('T')
1986
1986
def f(x: List[T]) -> T: pass
1987
1987
1988
1988
class C:
1989
- x = f([])
1989
+ x = f([]) # E: Need type annotation for variable
1990
1990
def m(self) -> str:
1991
1991
return 42 # E: Incompatible return value type (got "int", expected "str")
1992
1992
You can’t perform that action at this time.
0 commit comments