diff --git a/python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported.py b/python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported.py new file mode 100644 index 000000000000..2f8f644e9286 --- /dev/null +++ b/python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported.py @@ -0,0 +1,5 @@ +class MyClass: + pass + + +var = MyClass() \ No newline at end of file diff --git a/python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported_after.py b/python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported_after.py new file mode 100644 index 000000000000..b490b31e67e3 --- /dev/null +++ b/python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationSameModuleClassNotImported_after.py @@ -0,0 +1,5 @@ +class MyClass: + pass + + +var: [MyClass] = MyClass() \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/python/intentions/PyAnnotateVariableTypeIntentionTest.java b/python/testSrc/com/jetbrains/python/intentions/PyAnnotateVariableTypeIntentionTest.java index 7910224ad845..f316130026ff 100644 --- a/python/testSrc/com/jetbrains/python/intentions/PyAnnotateVariableTypeIntentionTest.java +++ b/python/testSrc/com/jetbrains/python/intentions/PyAnnotateVariableTypeIntentionTest.java @@ -211,6 +211,10 @@ public class PyAnnotateVariableTypeIntentionTest extends PyIntentionTestCase { doAnnotationTest(); } + public void testAnnotationSameModuleClassNotImported() { + doAnnotationTest(); + } + private void doAnnotationTest() { doTest(LanguageLevel.PYTHON36); }