diff --git a/python/psi-api/src/com/jetbrains/python/PyNames.java b/python/psi-api/src/com/jetbrains/python/PyNames.java index d41d00baed8c..b9da047eb27a 100644 --- a/python/psi-api/src/com/jetbrains/python/PyNames.java +++ b/python/psi-api/src/com/jetbrains/python/PyNames.java @@ -162,7 +162,7 @@ public class PyNames { public static final String NOT_IMPLEMENTED_ERROR = "NotImplementedError"; - public static final String UNKNOWN_TYPE = "unknown"; + public static final String UNKNOWN_TYPE = "Any"; public static final String UNNAMED_ELEMENT = ""; diff --git a/python/testData/inspections/PyTypeCheckerInspection/FunctionParameterReturnType.py b/python/testData/inspections/PyTypeCheckerInspection/FunctionParameterReturnType.py index 6d43c2ce0a27..efdfc5722cde 100644 --- a/python/testData/inspections/PyTypeCheckerInspection/FunctionParameterReturnType.py +++ b/python/testData/inspections/PyTypeCheckerInspection/FunctionParameterReturnType.py @@ -12,13 +12,13 @@ def f(x): def test(): - for item in func(f, []): + for item in func(f, []): pass - for item in func(int, []): + for item in func(int, []): pass - for item in func(lambda x: int(x), []): + for item in func(lambda x: int(x), []): pass for item in func(lambda x: str(x), []): diff --git a/python/testData/quickdoc/HoverOverFunction.html b/python/testData/quickdoc/HoverOverFunction.html index bc8a92ce6a0e..80cb50a4b9a5 100644 --- a/python/testData/quickdoc/HoverOverFunction.html +++ b/python/testData/quickdoc/HoverOverFunction.html @@ -1,2 +1,2 @@ def foo(arg) -Inferred type: (arg: unknown) -> int
\ No newline at end of file +Inferred type: (arg: Any) -> int
\ No newline at end of file diff --git a/python/testData/quickdoc/PropNewDeleter.html b/python/testData/quickdoc/PropNewDeleter.html index 2e18d12d552f..ba8ea0354c34 100644 --- a/python/testData/quickdoc/PropNewDeleter.html +++ b/python/testData/quickdoc/PropNewDeleter.html @@ -1 +1 @@ -property x of class A(object)
Copied from getter:
Does things to X

@x.deleter
def x(self, v)
Inferred type: (self: A, v: unknown) -> None

Deletes X


Deleter of property

\ No newline at end of file +property x of class A(object)
Copied from getter:
Does things to X

@x.deleter
def x(self, v)
Inferred type: (self: A, v: Any) -> None

Deletes X


Deleter of property

\ No newline at end of file diff --git a/python/testData/quickdoc/PropNewSetter.html b/python/testData/quickdoc/PropNewSetter.html index b04baf8a3e49..7ff1e2b6b184 100644 --- a/python/testData/quickdoc/PropNewSetter.html +++ b/python/testData/quickdoc/PropNewSetter.html @@ -1 +1 @@ -property x of class A(object)
Copied from getter:
Does things to X

@x.setter
def x(self, v)
Inferred type: (self: A, v: unknown) -> None

Sets X


Setter of property

\ No newline at end of file +property x of class A(object)
Copied from getter:
Does things to X

@x.setter
def x(self, v)
Inferred type: (self: A, v: Any) -> None

Sets X


Setter of property

\ No newline at end of file diff --git a/python/testData/quickdoc/PropOldDeleter.html b/python/testData/quickdoc/PropOldDeleter.html index b0187dbe49c6..6c51898d2a39 100644 --- a/python/testData/quickdoc/PropOldDeleter.html +++ b/python/testData/quickdoc/PropOldDeleter.html @@ -1 +1 @@ -property x of class A(object)

def __getX(self)
Inferred type: (self: A) -> unknown

Doc of getter


Deleter of property

\ No newline at end of file +property x of class A(object)

def __getX(self)
Inferred type: (self: A) -> Any

Doc of getter


Deleter of property

\ No newline at end of file diff --git a/python/testData/quickdoc/PropOldGetter.html b/python/testData/quickdoc/PropOldGetter.html index 40d2a92c7a7c..3cc14f424b77 100644 --- a/python/testData/quickdoc/PropOldGetter.html +++ b/python/testData/quickdoc/PropOldGetter.html @@ -1 +1 @@ -property x of class A(object)

def __getX(self)
Inferred type: (self: A) -> unknown

Doc of getter


Getter of property

\ No newline at end of file +property x of class A(object)

def __getX(self)
Inferred type: (self: A) -> Any

Doc of getter


Getter of property

\ No newline at end of file diff --git a/python/testData/quickdoc/PropOldSetter.html b/python/testData/quickdoc/PropOldSetter.html index 5fbbb3f96a28..35ab877edf4d 100644 --- a/python/testData/quickdoc/PropOldSetter.html +++ b/python/testData/quickdoc/PropOldSetter.html @@ -1 +1 @@ -property x of class A(object)

def __getX(self, x)
Inferred type: (self: A, x: unknown) -> None

Doc of getter


Setter of property

\ No newline at end of file +property x of class A(object)

def __getX(self, x)
Inferred type: (self: A, x: Any) -> None

Doc of getter


Setter of property

\ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PyTypeTest.java b/python/testSrc/com/jetbrains/python/PyTypeTest.java index 5e9dc354d2b7..3f1bb071fe94 100644 --- a/python/testSrc/com/jetbrains/python/PyTypeTest.java +++ b/python/testSrc/com/jetbrains/python/PyTypeTest.java @@ -101,7 +101,7 @@ public class PyTypeTest extends PyTestCase { // PY-1425 public void testNone() { - doTest("unknown", + doTest("Any", "class C:\n" + " def __init__(self): self.foo = None\n" + "expr = C().foo"); @@ -238,7 +238,7 @@ public class PyTypeTest extends PyTestCase { } public void testUnknownTypeInUnion() { - doTest("int | unknown", + doTest("int | Any", "def f(c, x):\n" + " if c:\n" + " return 1\n" + @@ -596,7 +596,7 @@ public class PyTypeTest extends PyTestCase { " foo(3)\n" + " foo('bar')\n"; final PyExpression expr = parseExpr(text); - doTest("int | str | unknown", expr, TypeEvalContext.codeCompletion(expr.getProject(), expr.getContainingFile())); + doTest("int | str | Any", expr, TypeEvalContext.codeCompletion(expr.getProject(), expr.getContainingFile())); } public void testUpperBoundGeneric() { @@ -764,7 +764,7 @@ public class PyTypeTest extends PyTestCase { } public void testNoResolveToFunctionsInTypes() { - doTest("C | unknown", + doTest("C | Any", "class C(object):\n" + " def bar(self):\n" + " pass\n" + diff --git a/python/testSrc/com/jetbrains/python/PyTypingTest.java b/python/testSrc/com/jetbrains/python/PyTypingTest.java index 3e1cd2312a28..3d4c95085274 100644 --- a/python/testSrc/com/jetbrains/python/PyTypingTest.java +++ b/python/testSrc/com/jetbrains/python/PyTypingTest.java @@ -132,7 +132,7 @@ public class PyTypingTest extends PyTestCase { } public void testAnyType() { - doTest("unknown", + doTest("Any", "from typing import Any\n" + "\n" + "def f(expr: Any):\n" +