diff --git a/Lib/profiling/sampling/stack_collector.py b/Lib/profiling/sampling/stack_collector.py index 9df8111c451de8..25539640b8de40 100644 --- a/Lib/profiling/sampling/stack_collector.py +++ b/Lib/profiling/sampling/stack_collector.py @@ -85,8 +85,9 @@ def export(self, filename): print(f"Flamegraph saved to: {filename}") + @staticmethod @functools.lru_cache(maxsize=None) - def _format_function_name(self, func): + def _format_function_name(func): filename, lineno, funcname = func if len(filename) > 50: