mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
[python] Fix nullability annotations (PyAstNumericLiteralExpression)
GitOrigin-RevId: d5db0add83ac134aab91198b1a931c026829d216
This commit is contained in:
committed by
intellij-monorepo-bot
parent
38ee9327a6
commit
7f22ee443e
@@ -73,7 +73,7 @@ data class PyVersionCheck(val version: Version, val isLessThan: Boolean) {
|
||||
private fun evaluateNumber(expression: PyAstExpression?): Int? {
|
||||
if (expression !is PyAstNumericLiteralExpression) return null
|
||||
if (!expression.isIntegerLiteral) return null
|
||||
val value = expression.bigIntegerValue ?: return null
|
||||
val value = expression.bigIntegerValue
|
||||
val intValue = value.toInt()
|
||||
return if (BigInteger.valueOf(intValue.toLong()) == value) intValue else null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user