[python] Don't treat PyClassLikeType as PyCallableType in PyTypeVisitor by default

GitOrigin-RevId: 647848f03c4816fb96a6bfcfcad6d9c7258a57ea
This commit is contained in:
Mikhail Golubev
2025-05-14 09:51:56 +00:00
committed by intellij-monorepo-bot
parent 1765651746
commit 00c78ebb84
2 changed files with 2 additions and 10 deletions
@@ -43,7 +43,8 @@ public abstract class PyTypeVisitor<T> {
}
public T visitPyClassLikeType(@NotNull PyClassLikeType classLikeType) {
return visitPyCallableType(classLikeType);
// Don't treat PyClassLikeType as PyCallableType. It's usually not what a visitor's user expects.
return visitPyType(classLikeType);
}
public T visitPyFunctionType(@NotNull PyFunctionType functionType) {