Tai Truong
fix readme
d202ada
raw
history blame contribute delete
306 Bytes
from typing import Any
def format_type(type_: Any) -> str:
if type_ is str:
type_ = "Text"
elif hasattr(type_, "__name__"):
type_ = type_.__name__
elif hasattr(type_, "__class__"):
type_ = type_.__class__.__name__
else:
type_ = str(type_)
return type_