From 0eea6bc19f6f76c973be36266a6042d67bdd13f9 Mon Sep 17 00:00:00 2001 From: brucemeek <113046530+brucemeek@users.noreply.github.com> Date: Tue, 1 Aug 2023 20:56:09 -0500 Subject: [PATCH] corrected the common.py file --- metagpt/utils/common.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/metagpt/utils/common.py b/metagpt/utils/common.py index aa2f5bb98..399ff22de 100644 --- a/metagpt/utils/common.py +++ b/metagpt/utils/common.py @@ -214,4 +214,13 @@ def print_members(module, indent=0): prefix = ' ' * indent for name, obj in inspect.getmembers(module): print(name, obj) - if inspect + if inspect.isclass(obj): + print(f'{prefix}Class: {name}') + # print the methods within the class + if name in ['__class__', '__base__']: + continue + print_members(obj, indent + 2) + elif inspect.isfunction(obj): + print(f'{prefix}Function: {name}') + elif inspect.ismethod(obj): + print(f'{prefix}Method: {name}') \ No newline at end of file