From f5a18c344d90a444e38fb775c759527eeaa08650 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Wed, 18 Jun 2025 16:43:37 +0300 Subject: [PATCH] Update types_base.py fix 3.7 again --- mastodon/types_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mastodon/types_base.py b/mastodon/types_base.py index 1a770d9..2ee6514 100644 --- a/mastodon/types_base.py +++ b/mastodon/types_base.py @@ -405,10 +405,11 @@ def try_cast_recurse(t, value, union_specializer=None): except Exception as e: try: # If the new robust method doesn't work, try the old and less robust method - value._mastopy_type = repr(save_type).replace("mastodon.return_types.", "").replace("mastodon.types_base.", "") + value._mastopy_type = repr(save_type) except: # Failures are silently ignored. We care about maximum not breaking here. pass + value._mastopy_type = value._mastopy_type.replace("mastodon.return_types.", "").replace("mastodon.types_base.", "") if value._mastopy_type.startswith(""): value._mastopy_type = value._mastopy_type[8:-2] return value