mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-17 22:20:41 +00:00
skip typevar
This commit is contained in:
parent
d1dc670142
commit
fd7d4d0c9b
@ -130,33 +130,33 @@ class TypeVar : public object {
|
|||||||
// NameWrapper(const char *name) { attr("__name__") = name; }
|
// NameWrapper(const char *name) { attr("__name__") = name; }
|
||||||
// };
|
// };
|
||||||
|
|
||||||
template <typename T>
|
// template <typename T>
|
||||||
class TypeVarObject : public object {
|
// class TypeVarObject : public object {
|
||||||
PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
// PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
||||||
using object::object;
|
// using object::object;
|
||||||
TypeVarObject(const char *name) {
|
// TypeVarObject(const char *name) {
|
||||||
attr("__name__") = name;
|
// attr("__name__") = name;
|
||||||
attr("__bound__") = object();
|
// attr("__bound__") = object();
|
||||||
attr("__bound__").attr("__name__") = pybind11::detail::make_caster<T>::name;
|
// attr("__bound__").attr("__name__") = pybind11::detail::make_caster<T>::name;
|
||||||
attr("__constraints__") = pybind11::make_tuple();
|
// attr("__constraints__") = pybind11::make_tuple();
|
||||||
}
|
// }
|
||||||
// TypeVarObject(const char *name, py::typing::Tuple<pybind11::type, pybind11::ellipse> tuple){
|
// // TypeVarObject(const char *name, py::typing::Tuple<pybind11::type, pybind11::ellipse> tuple){
|
||||||
// attr("__name__") = name;
|
// // attr("__name__") = name;
|
||||||
// attr("__bound__") = py::none();
|
// // attr("__bound__") = py::none();
|
||||||
// attr("__constraints__") = tuple;
|
// // attr("__constraints__") = tuple;
|
||||||
// }
|
// // }
|
||||||
};
|
// };
|
||||||
|
|
||||||
template <>
|
// template <>
|
||||||
class TypeVarObject : public object {
|
// class TypeVarObject : public object {
|
||||||
PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
// PYBIND11_OBJECT_DEFAULT(TypeVarObject, object, PyObject_Type)
|
||||||
using object::object;
|
// using object::object;
|
||||||
TypeVarObject(const char *name) {
|
// TypeVarObject(const char *name) {
|
||||||
attr("__name__") = name;
|
// attr("__name__") = name;
|
||||||
attr("__bound__") = py::none();
|
// attr("__bound__") = py::none();
|
||||||
attr("__constraints__") = pybind11::make_tuple();
|
// attr("__constraints__") = pybind11::make_tuple();
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
class ParamSpec : public object {
|
class ParamSpec : public object {
|
||||||
PYBIND11_OBJECT_DEFAULT(ParamSpec, object, PyObject_Type)
|
PYBIND11_OBJECT_DEFAULT(ParamSpec, object, PyObject_Type)
|
||||||
|
Loading…
Reference in New Issue
Block a user