From 02ecd5f86570b2734a976264c928318147a4477f Mon Sep 17 00:00:00 2001 From: loriasun Date: Mon, 11 Apr 2022 16:49:33 -0400 Subject: [PATCH] having ic() output class name --- icecream/icecream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icecream/icecream.py b/icecream/icecream.py index 83fb753..01b2ef9 100644 --- a/icecream/icecream.py +++ b/icecream/icecream.py @@ -329,7 +329,7 @@ def _formatTime(self): def _getContext(self, callFrame, callNode): lineNumber = callNode.lineno frameInfo = inspect.getframeinfo(callFrame) - parentFunction = frameInfo.function + parentFunction = executing.Source.executing(callFrame).code_qualname() filename = basename(frameInfo.filename) return filename, lineNumber, parentFunction