mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-24834 Disable tests requiring weak union semantics
GitOrigin-RevId: 7789fc014c8c413c44cba23865737dbba3860325
This commit is contained in:
committed by
intellij-monorepo-bot
parent
523f0f2e2c
commit
f8e21af84e
@@ -70,6 +70,7 @@ public class PyBinaryExpressionImpl extends PyElementImpl implements PyBinaryExp
|
||||
PyType callResultType = PyCallExpressionHelper.getCallType(this, context, key);
|
||||
if (callResultType != null) {
|
||||
boolean bothOperandsAreKnown = operandIsKnown(getLeftExpression(), context) && operandIsKnown(getRightExpression(), context);
|
||||
// TODO requires weak union. See PyTypeCheckerInspectionTest#testBinaryExpressionWithUnknownOperand
|
||||
return bothOperandsAreKnown ? callResultType : PyUnionType.createWeakType(callResultType);
|
||||
}
|
||||
if (referencedName != null && PyNames.COMPARISON_OPERATORS.contains(referencedName)) {
|
||||
|
||||
@@ -562,6 +562,7 @@ private fun ClarifiedResolveResult.clarifyConstructorCallType(callSite: PyCallSi
|
||||
return initOrNewCallType
|
||||
}
|
||||
if (initOrNewCallType == null) {
|
||||
// TODO requires weak union. See PyUnresolvedReferencesInspectionTest.testCustomNewReturnInAnotherModule
|
||||
return PyUnionType.createWeakType(PyClassTypeImpl(receiverClass, false))
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
from b import C
|
||||
|
||||
c = C()
|
||||
c.<weak_warning descr="Some members of 'Union[C, Any]' don't have attribute 'foo'">foo</weak_warning>()
|
||||
c.foo()
|
||||
|
||||
@@ -429,9 +429,9 @@ public class PyTypeCheckerInspectionTest extends PyInspectionTestCase {
|
||||
}
|
||||
|
||||
// PY-9662
|
||||
public void testBinaryExpressionWithUnknownOperand() {
|
||||
runWithLanguageLevel(LanguageLevel.PYTHON35, this::doTest);
|
||||
}
|
||||
//public void testBinaryExpressionWithUnknownOperand() {
|
||||
// runWithLanguageLevel(LanguageLevel.PYTHON35, this::doTest);
|
||||
//}
|
||||
|
||||
// PY-16066
|
||||
public void testBasestringMatchesType() {
|
||||
|
||||
+3
-3
@@ -293,9 +293,9 @@ public class PyUnresolvedReferencesInspectionTest extends PyInspectionTestCase {
|
||||
}
|
||||
|
||||
// PY-10893
|
||||
public void testCustomNewReturnInAnotherModule() {
|
||||
doMultiFileTest("a.py");
|
||||
}
|
||||
//public void testCustomNewReturnInAnotherModule() {
|
||||
// doMultiFileTest("a.py");
|
||||
//}
|
||||
|
||||
public void testBytesIOMethods() {
|
||||
doTest();
|
||||
|
||||
Reference in New Issue
Block a user