mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
PY-47532 Simplify a chain of .let in PyDataclassTypeProvider
GitOrigin-RevId: 4466dd43ef0ae2168bc08699ebbde313a3c55d3c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0260afeb90
commit
4964808eb1
@@ -29,9 +29,8 @@ class PyDataclassTypeProvider : PyTypeProviderBase() {
|
||||
referenceTarget is PyParameter && referenceTarget.isSelf && anchor is PyCallExpression -> {
|
||||
PsiTreeUtil.getParentOfType(referenceTarget, PyFunction::class.java)
|
||||
?.takeIf { it.modifier == PyFunction.Modifier.CLASSMETHOD }
|
||||
?.let {
|
||||
it.containingClass?.let { getDataclassTypeForClass(it, context) }
|
||||
}
|
||||
?.containingClass
|
||||
?.let { getDataclassTypeForClass(it, context) }
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user