Don't raise none assignment warning when return type is not None (PY-28729)

This commit is contained in:
Semyon Proshev
2018-04-02 20:06:28 +03:00
parent 147e2499ed
commit dc4b93db04
2 changed files with 10 additions and 1 deletions
@@ -33,6 +33,15 @@ public class Py3NoneFunctionAssignmentInspectionTest extends PyInspectionTestCas
doMultiFileTest();
}
// PY-28729
public void testGenericSubstitutedWithNone() {
doTestByText(
"test1 = max([])\n" +
"test2 = max([], default=None)\n" +
"test3 = max([], default=0)"
);
}
@NotNull
@Override
protected Class<? extends PyInspection> getInspectionClass() {