fix typing with latest ipython · pandas-dev/pandas@8acd314 (original) (raw)

Original file line number Diff line number Diff line change
@@ -259,9 +259,10 @@ def enable_data_resource_formatter(enable: bool) -> None:
259 259 if mimetype not in formatters:
260 260 # define tableschema formatter
261 261 from IPython.core.formatters import BaseFormatter
262 +from traitlets import ObjectName
262 263
263 264 class TableSchemaFormatter(BaseFormatter):
264 -print_method = "_repr_data_resource_"
265 +print_method = ObjectName("_repr_data_resource_")
265 266 _return_type = (dict,)
266 267
267 268 # register it: