Skip to content

Commit

Permalink
Lint Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vprajapati-tt committed Nov 14, 2024
1 parent f71f547 commit 5ee502a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/ttmlir/Bindings/Python/TTMLIRModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ py::class_<T> tt_attribute_class(py::module &m, const char *class_name) {
cls.def_static("maybe_downcast",
[](MlirAttribute attr) -> std::variant<T, py::object> {
auto res = mlir::dyn_cast<T>(unwrap(attr));
if (res)
if (res) {
return res;
else
return py::none();
}
return py::none();
});
return cls;
}
Expand All @@ -47,10 +47,10 @@ py::class_<T> tt_type_class(py::module &m, const char *class_name) {
cls.def_static("maybe_downcast",
[](MlirType type) -> std::variant<T, py::object> {
auto res = mlir::dyn_cast<T>(unwrap(type));
if (res)
if (res) {
return res;
else
return py::none();
}
return py::none();
});
return cls;
}
Expand Down

0 comments on commit 5ee502a

Please sign in to comment.