diff --git a/betterproto/plugin.py b/betterproto/plugin.py index 6fc92b6..85557bc 100755 --- a/betterproto/plugin.py +++ b/betterproto/plugin.py @@ -202,7 +202,7 @@ def generate_code(request, response): ) if match_wrapper: wrapped_type = "TYPE_" + match_wrapper.group(1).upper() - if wrapped_type in dir(betterproto): + if hasattr(betterproto, wrapped_type): field_wraps = f"betterproto.{wrapped_type}" map_types = None