diff --git a/include/pybind11/detail/type_caster_base.h b/include/pybind11/detail/type_caster_base.h index 02d2fa9ba86..0b710d7e4c4 100644 --- a/include/pybind11/detail/type_caster_base.h +++ b/include/pybind11/detail/type_caster_base.h @@ -1011,9 +1011,8 @@ PYBIND11_NOINLINE std::string type_info_description(const std::type_info &ti) { handle th((PyObject *) type_data->type); return th.attr("__module__").cast() + '.' + th.attr("__qualname__").cast(); - } else { - return clean_type_id(ti.name()); } + return clean_type_id(ti.name()); } PYBIND11_NAMESPACE_END(detail)