diff --git a/python/testData/quickdoc/OptionalParameterType.html b/python/testData/quickdoc/OptionalParameterType.html index 9ec3d77a8dcc..5f969e5352f2 100644 --- a/python/testData/quickdoc/OptionalParameterType.html +++ b/python/testData/quickdoc/OptionalParameterType.html @@ -1 +1 @@ -def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
Inferred type: (file: str, mode: str, buffering: Integral, encoding: Optional[str], errors: Optional[str], newline: Optional[str], closefd: bool, opener: Optional[(str, int) -> int]) -> Union[FileIO[str], TextIOWrapper[unicode]]

This is an alias for the builtin open() function.

\ No newline at end of file +def open(encoding: str = None, errors: str = None)
Inferred type: (encoding: Optional[str], errors: Optional[str]) -> None
\ No newline at end of file diff --git a/python/testData/quickdoc/OptionalParameterType.py b/python/testData/quickdoc/OptionalParameterType.py index 00006b94069a..07e5f59d5302 100644 --- a/python/testData/quickdoc/OptionalParameterType.py +++ b/python/testData/quickdoc/OptionalParameterType.py @@ -1,16 +1,4 @@ -def open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None): - """This is an alias for the builtin open() function. - - :type file: str - :type mode: str - :type buffering: numbers.Integral - :type encoding: str | None - :type errors: str | None - :type newline: str | None - :type closefd: bool - :type opener: ((str, int) -> int) | None - :rtype: io.FileIO[bytes] | io.TextIOWrapper[unicode] - """ +def open(encoding: str = None, errors: str = None): pass -open("service") \ No newline at end of file +open() \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/PyQuickDocTest.java b/python/testSrc/com/jetbrains/python/PyQuickDocTest.java index c59420e0c17a..7746b33e004b 100644 --- a/python/testSrc/com/jetbrains/python/PyQuickDocTest.java +++ b/python/testSrc/com/jetbrains/python/PyQuickDocTest.java @@ -263,7 +263,7 @@ public class PyQuickDocTest extends LightMarkedTestCase { // PY-17705 public void testOptionalParameterType() { - checkHTMLOnly(); + runWithLanguageLevel(LanguageLevel.PYTHON35, this::checkHTMLOnly); } public void testHomogeneousTuple() {