Handle repr of types

This commit is contained in:
Philipp Rudiger
2022-05-02 18:30:33 +02:00
parent 442af7bd97
commit 3457d4313a
2 changed files with 3 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ def format_mime(obj):
"""
Formats object using _repr_x_ methods.
"""
if isinstance(obj, str):
if isinstance(obj, (str, type)):
return obj, 'text/plain'
mimebundle = eval_formatter(obj, '_repr_mimebundle_')