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

This commit is contained in:
Paddle
2023-08-07 07:21:04 +02:00
committed by Chris Hennes
parent 236bd2c189
commit 8f8a799726
3 changed files with 21 additions and 1 deletions

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();