kopia lustrzana https://github.com/halcy/Mastodon.py
rodzic
c563d53b21
commit
4e2f11c121
|
@ -406,11 +406,11 @@ def try_cast_recurse(t, value, union_specializer=None):
|
||||||
try:
|
try:
|
||||||
# If the new robust method doesn't work, try the old and less robust method
|
# 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).replace("mastodon.return_types.", "").replace("mastodon.types_base.", "")
|
||||||
if value._mastopy_type.startswith("<class '") and value._mastopy_type.endswith("'>"):
|
|
||||||
value._mastopy_type = value._mastopy_type[8:-2]
|
|
||||||
except:
|
except:
|
||||||
# Failures are silently ignored. We care about maximum not breaking here.
|
# Failures are silently ignored. We care about maximum not breaking here.
|
||||||
pass
|
pass
|
||||||
|
if value._mastopy_type.startswith("<class '") and value._mastopy_type.endswith("'>"):
|
||||||
|
value._mastopy_type = value._mastopy_type[8:-2]
|
||||||
return value
|
return value
|
||||||
|
|
||||||
class Entity():
|
class Entity():
|
||||||
|
|
Ładowanie…
Reference in New Issue