mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
PY-76629 PY-39761 Don't type check __class_getitem__ arguments inside type hints
GitOrigin-RevId: 060a2952d49777bff9853a2d5bc4d257271e559e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
732cd5275a
commit
20b2e20d26
@@ -63,6 +63,9 @@ public class PyTypeCheckerInspection extends PyInspection {
|
||||
// Type check in TypedDict subscription expressions cannot be properly done because each key should have its own value type,
|
||||
// so this case is covered by PyTypedDictInspection
|
||||
if (myTypeEvalContext.getType(node.getOperand()) instanceof PyTypedDictType) return;
|
||||
// Don't type check __class_getitem__ calls inside type hints. Normally these are not type hinted as a construct
|
||||
// special-cased by type checkers
|
||||
if (PyTypingTypeProvider.isInsideTypeHint(node, myTypeEvalContext)) return;
|
||||
checkCallSite(node);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user