@@ -513,7 +513,7 @@ class PyOperationIterator {
513513
514514 PyOperationIterator &dunderIter () { return *this ; }
515515
516- nb::typed<nb:: object, PyOpView> dunderNext () {
516+ nb::object dunderNext () {
517517 parentOperation->checkValid ();
518518 if (mlirOperationIsNull (next)) {
519519 throw nb::stop_iteration ();
@@ -562,7 +562,7 @@ class PyOperationList {
562562 return count;
563563 }
564564
565- nb::typed<nb:: object, PyOpView> dunderGetItem (intptr_t index) {
565+ nb::object dunderGetItem (intptr_t index) {
566566 parentOperation->checkValid ();
567567 if (index < 0 ) {
568568 index += dunderLen ();
@@ -1534,7 +1534,7 @@ nb::object PyOperation::create(std::string_view name,
15341534 return created.getObject ();
15351535}
15361536
1537- nb::typed<nb:: object, PyOpView> PyOperation::clone (const nb::object &maybeIp) {
1537+ nb::object PyOperation::clone (const nb::object &maybeIp) {
15381538 MlirOperation clonedOperation = mlirOperationClone (operation);
15391539 PyOperationRef cloned =
15401540 PyOperation::createDetached (getContext (), clonedOperation);
@@ -1543,7 +1543,7 @@ nb::typed<nb::object, PyOpView> PyOperation::clone(const nb::object &maybeIp) {
15431543 return cloned->createOpView ();
15441544}
15451545
1546- nb::typed<nb:: object, PyOpView> PyOperation::createOpView () {
1546+ nb::object PyOperation::createOpView () {
15471547 checkValid ();
15481548 MlirIdentifier ident = mlirOperationGetName (get ());
15491549 MlirStringRef identStr = mlirIdentifierStr (ident);
@@ -1638,9 +1638,9 @@ class PyOpResult : public PyConcreteValue<PyOpResult> {
16381638
16391639// / Returns the list of types of the values held by container.
16401640template <typename Container>
1641- static std::vector<nb::typed<nb:: object, PyType>>
1642- getValueTypes (Container &container, PyMlirContextRef &context) {
1643- std::vector<nb::typed<nb:: object, PyType> > result;
1641+ static std::vector<nb::object> getValueTypes (Container &container,
1642+ PyMlirContextRef &context) {
1643+ std::vector<nb::object> result;
16441644 result.reserve (container.size ());
16451645 for (int i = 0 , e = container.size (); i < e; ++i) {
16461646 result.push_back (PyType (context->getRef (),
@@ -2133,7 +2133,7 @@ PyAttribute PyAttribute::createFromCapsule(nb::object capsule) {
21332133 PyMlirContext::forContext (mlirAttributeGetContext (rawAttr)), rawAttr);
21342134}
21352135
2136- nb::typed<nb:: object, PyAttribute> PyAttribute::maybeDownCast () {
2136+ nb::object PyAttribute::maybeDownCast () {
21372137 MlirTypeID mlirTypeID = mlirAttributeGetTypeID (this ->get ());
21382138 assert (!mlirTypeIDIsNull (mlirTypeID) &&
21392139 " mlirTypeID was expected to be non-null." );
@@ -2179,7 +2179,7 @@ PyType PyType::createFromCapsule(nb::object capsule) {
21792179 rawType);
21802180}
21812181
2182- nb::typed<nb:: object, PyType> PyType::maybeDownCast () {
2182+ nb::object PyType::maybeDownCast () {
21832183 MlirTypeID mlirTypeID = mlirTypeGetTypeID (this ->get ());
21842184 assert (!mlirTypeIDIsNull (mlirTypeID) &&
21852185 " mlirTypeID was expected to be non-null." );
@@ -2219,7 +2219,7 @@ nb::object PyValue::getCapsule() {
22192219 return nb::steal<nb::object>(mlirPythonValueToCapsule (get ()));
22202220}
22212221
2222- nanobind::typed<nanobind:: object, PyValue> PyValue::maybeDownCast () {
2222+ nb:: object PyValue::maybeDownCast () {
22232223 MlirType type = mlirValueGetType (get ());
22242224 MlirTypeID mlirTypeID = mlirTypeGetTypeID (type);
22252225 assert (!mlirTypeIDIsNull (mlirTypeID) &&
@@ -2263,8 +2263,7 @@ PySymbolTable::PySymbolTable(PyOperationBase &operation)
22632263 }
22642264}
22652265
2266- nb::typed<nb::object, PyOpView>
2267- PySymbolTable::dunderGetItem (const std::string &name) {
2266+ nb::object PySymbolTable::dunderGetItem (const std::string &name) {
22682267 operation->checkValid ();
22692268 MlirOperation symbol = mlirSymbolTableLookup (
22702269 symbolTable, mlirStringRefCreate (name.data (), name.length ()));
@@ -2678,8 +2677,7 @@ class PyOpAttributeMap {
26782677 PyOpAttributeMap (PyOperationRef operation)
26792678 : operation(std::move(operation)) {}
26802679
2681- nb::typed<nb::object, PyAttribute>
2682- dunderGetItemNamed (const std::string &name) {
2680+ nb::object dunderGetItemNamed (const std::string &name) {
26832681 MlirAttribute attr = mlirOperationGetAttributeByName (operation->get (),
26842682 toMlirStringRef (name));
26852683 if (mlirAttributeIsNull (attr)) {
0 commit comments