diff --git a/mlir/lib/Bindings/Python/IRModules.cpp b/mlir/lib/Bindings/Python/IRModules.cpp --- a/mlir/lib/Bindings/Python/IRModules.cpp +++ b/mlir/lib/Bindings/Python/IRModules.cpp @@ -72,9 +72,6 @@ behavior. )"; -static const char kTypeStrDunderDocstring[] = - R"(Prints the assembly form of the type.)"; - static const char kDumpDocstring[] = R"(Dumps a debug representation of the object to stderr.)"; @@ -1822,7 +1819,7 @@ printAccum.getUserData()); return printAccum.join(); }, - kTypeStrDunderDocstring); + "Returns the assembly form of the operation."); // Mapping of PyRegion. py::class_(m, "Region") @@ -1891,9 +1888,9 @@ printAccum.getUserData()); return printAccum.join(); }, - kTypeStrDunderDocstring); + "Returns the assembly form of the block."); - // Mapping of Type. + // Mapping of PyAttribute. py::class_(m, "Attribute") .def_property_readonly( "context", @@ -1925,7 +1922,7 @@ printAccum.getUserData()); return printAccum.join(); }, - kTypeStrDunderDocstring) + "Returns the assembly form of the Attribute.") .def("__repr__", [](PyAttribute &self) { // Generally, assembly formats are not printed for __repr__ because // this can cause exceptionally long debug output and exceptions. @@ -1977,7 +1974,7 @@ PyBoolAttribute::bind(m); PyStringAttribute::bind(m); - // Mapping of Type. + // Mapping of PyType. py::class_(m, "Type") .def_property_readonly( "context", [](PyType &self) { return self.getContext().getObject(); }, @@ -2001,7 +1998,7 @@ printAccum.getUserData()); return printAccum.join(); }, - kTypeStrDunderDocstring) + "Returns the assembly form of the type.") .def("__repr__", [](PyType &self) { // Generally, assembly formats are not printed for __repr__ because // this can cause exceptionally long debug output and exceptions.