mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
+12
@@ -0,0 +1,12 @@
|
||||
from pkg1 import C
|
||||
|
||||
|
||||
def foo():
|
||||
"""
|
||||
:rtype: pkg1.C
|
||||
"""
|
||||
return C(0)
|
||||
|
||||
|
||||
obj = foo()
|
||||
obj.bar
|
||||
+1
@@ -0,0 +1 @@
|
||||
from m1 import *
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
class C(object):
|
||||
def __init__(self, bar):
|
||||
"""
|
||||
:param int bar: Some parameter
|
||||
"""
|
||||
self.bar = bar
|
||||
+5
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user