Don't use Cython resolver for resolving references to __init__.py (PY-13554, PY-14102)

Normal resolvers should do their job with __init__.py. Using the Cython
resolver instead resulted in bypassing class type to instance type
casting for docstring type references to classses in nested packages.
This commit is contained in:
Andrey Vlasovskikh
2014-11-14 20:01:51 +03:00
parent 870b5ce016
commit 62bd8bee5e
4 changed files with 24 additions and 0 deletions
@@ -0,0 +1,12 @@
from pkg1 import C
def foo():
"""
:rtype: pkg1.C
"""
return C(0)
obj = foo()
obj.bar
@@ -0,0 +1,6 @@
class C(object):
def __init__(self, bar):
"""
:param int bar: Some parameter
"""
self.bar = bar
@@ -410,6 +410,11 @@ public class PyUnresolvedReferencesInspectionTest extends PyInspectionTestCase {
myFixture.checkHighlighting(isWarning(), isInfo(), isWeakWarning());
}
// PY-13554
public void testDocstringTypeFromSubModule() {
doMultiFileTest();
}
@NotNull
@Override
protected Class<? extends PyInspection> getInspectionClass() {