Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mypy/typeanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def try_analyze_special_unbound_type(self, t: UnboundType, fullname: str) -> Typ
"""
if fullname == "builtins.None":
return NoneType()
elif fullname == "typing.Any" or fullname == "builtins.Any":
elif fullname == "typing.Any":
return AnyType(TypeOfAny.explicit, line=t.line, column=t.column)
elif fullname in FINAL_TYPE_NAMES:
if self.prohibit_special_class_field_types:
Expand Down
1 change: 1 addition & 0 deletions test-data/unit/check-ctypes.test
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ cua.raw # E: Array attribute "raw" is only available with element type "c_char"

[case testCtypesAnyArrayAttrs]
import ctypes
from typing import Any

aa: ctypes.Array[Any]
reveal_type(aa.value) # N: Revealed type is "Any"
Expand Down
4 changes: 1 addition & 3 deletions test-data/unit/fixtures/float.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from typing import Generic, TypeVar
from typing import Generic, TypeVar, Any
T = TypeVar('T')

Any = 0

class object:
def __init__(self) -> None: pass

Expand Down
4 changes: 1 addition & 3 deletions test-data/unit/fixtures/floatdict.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from typing import TypeVar, Generic, Iterable, Iterator, Mapping, Tuple, overload, Optional, Union
from typing import TypeVar, Generic, Iterable, Iterator, Mapping, Tuple, overload, Optional, Union, Any

T = TypeVar('T')
KT = TypeVar('KT')
VT = TypeVar('VT')

Any = 0

class object:
def __init__(self) -> None: pass

Expand Down