PY-73107 Usages of @warnings.deprecated inside .pyi stubs are ignored

GitOrigin-RevId: 7682eff8c8ca8ae8241ddee3191add34ab2ac22e
This commit is contained in:
Andrey Vokin
2024-06-17 15:32:12 +02:00
committed by intellij-monorepo-bot
parent 84243e4280
commit f2a322c6d9
6 changed files with 27 additions and 4 deletions

View File

@@ -12,11 +12,10 @@ fun extractDeprecationMessageFromDecorator(element: PyAstDecoratable): String? {
return null
}
val argumentList = deprecatedDecorator.argumentList ?: return null
if (argumentList.arguments.isEmpty()) {
if (deprecatedDecorator.arguments.isEmpty()) {
return null
}
val argument = argumentList.arguments[0] as? PyAstStringLiteralExpression ?: return null
val argument = deprecatedDecorator.arguments[0] as? PyAstStringLiteralExpression ?: return null
return argument.stringValue
}