diff --git a/objtyping/objtyping.py b/objtyping/objtyping.py index 8ad1165..9997e3b 100644 --- a/objtyping/objtyping.py +++ b/objtyping/objtyping.py @@ -177,6 +177,9 @@ def _convert(self, obj:Any, depth:int, objs_chain:Set): """ if obj is None or depth > self.max_depth: return None + if inspect.isfunction(obj) or inspect.ismethod(obj): + return None + if not is_basic_type(obj) and id(obj) in objs_chain: return f'$$recursive reference:{str(obj)}$$' else: diff --git a/setup.py b/setup.py index f539778..df20957 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ name="objtyping", # version of the module - version="0.5.1", + version="0.5.2", # Name of Author author="Song Hui",