mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] Code cleanup (PyTypingConformanceTest)
GitOrigin-RevId: 693bc3e916518589b5e9e424966cd317c3f0d387
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dc6eeb2807
commit
0c84ce591d
@@ -22,8 +22,6 @@ import kotlin.io.path.div
|
||||
import kotlin.io.path.listDirectoryEntries
|
||||
import kotlin.io.path.name
|
||||
|
||||
private const val CHECK_OPTIONAL_ERRORS = false
|
||||
|
||||
private val inspections
|
||||
get() = arrayOf(
|
||||
PyArgumentListInspection(),
|
||||
@@ -149,7 +147,7 @@ class PyTypingConformanceTest(private val testFileName: String) : PyTestCase() {
|
||||
val failMessage = StringBuilder()
|
||||
|
||||
for ((lineNumber, expectedError) in expectedErrors.lineToError) {
|
||||
if (CHECK_OPTIONAL_ERRORS || !expectedError.isOptional) {
|
||||
if (!expectedError.isOptional) {
|
||||
val actualError = actualErrors[lineNumber]
|
||||
if (actualError == null) {
|
||||
missingErrorsCount++
|
||||
@@ -163,7 +161,7 @@ class PyTypingConformanceTest(private val testFileName: String) : PyTestCase() {
|
||||
}
|
||||
|
||||
for ((tag, lineNumbers) in expectedErrors.errorGroups) {
|
||||
if (!lineNumbers.isEmpty() && lineNumbers.all { it !in actualErrors }) {
|
||||
if (!lineNumbers.any { it in actualErrors }) {
|
||||
missingErrorsCount++
|
||||
failMessage.append("Expected error (tag $tag) at ").appendLocation(lineNumbers[0])
|
||||
lineNumbers.subList(1, lineNumbers.size).map { it + 1 }.joinTo(failMessage, ", ", "[", "]")
|
||||
|
||||
Reference in New Issue
Block a user