Add 'type' to MetadataPy, MetadataPyImp and addonmanager_metadata.py

This commit is contained in:
Paddle
2023-08-07 10:52:08 -06:00
committed by Chris Hennes
parent ff92f5d0cf
commit 61daaceb8f
3 changed files with 21 additions and 1 deletions
+13
View File
@@ -192,6 +192,19 @@ void MetadataPy::setDescription(Py::Object args)
getMetadataPtr()->setDescription(description);
}
Py::Object MetadataPy::getType() const
{
return Py::String(getMetadataPtr()->type());
}
void MetadataPy::setType(Py::Object args)
{
const char *type = nullptr;
if (!PyArg_Parse(args.ptr(), "s", &type))
throw Py::Exception();
getMetadataPtr()->setType(type);
}
Py::Object MetadataPy::getMaintainer() const
{
auto maintainers = getMetadataPtr()->maintainer();