File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1201,8 +1201,8 @@ class type_caster_base : public type_caster_generic {
1201
1201
static Constructor make_move_constructor (...) { return nullptr ; }
1202
1202
};
1203
1203
1204
- inline std::string annotated_any (const std::string &cpp_type ) {
1205
- return " Annotated[Any, pybind11.CppType( \" " + cpp_type + " \" )] " ;
1204
+ inline std::string quote_cpp_type_name (const std::string &cpp_type_name ) {
1205
+ return " ` " + cpp_type_name + " ` " ; // See PR #4888
1206
1206
}
1207
1207
1208
1208
PYBIND11_NOINLINE std::string type_info_description (const std::type_info &ti) {
@@ -1211,7 +1211,7 @@ PYBIND11_NOINLINE std::string type_info_description(const std::type_info &ti) {
1211
1211
return th.attr (" __module__" ).cast <std::string>() + ' .'
1212
1212
+ th.attr (" __qualname__" ).cast <std::string>();
1213
1213
}
1214
- return annotated_any (clean_type_id (ti.name ()));
1214
+ return quote_cpp_type_name (clean_type_id (ti.name ()));
1215
1215
}
1216
1216
1217
1217
PYBIND11_NAMESPACE_END (detail)
Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ class cpp_function : public function {
492
492
signature += rec->scope .attr (" __module__" ).cast <std::string>() + " ."
493
493
+ rec->scope .attr (" __qualname__" ).cast <std::string>();
494
494
} else {
495
- signature += detail::annotated_any (detail::clean_type_id (t->name ()));
495
+ signature += detail::quote_cpp_type_name (detail::clean_type_id (t->name ()));
496
496
}
497
497
} else {
498
498
signature += c;
You can’t perform that action at this time.
0 commit comments