Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and cmastalli committed Jul 30, 2023
1 parent 70f12f1 commit 52e13ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/eigenpy/copyable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ struct CopyableVisitor : public bp::def_visitor<CopyableVisitor<C> > {
template <class PyClass>
void visit(PyClass& cl) const {
cl.def("copy", &copy, bp::arg("self"), "Returns a copy of *this.");
cl.def("__copy__", &copy,bp::arg("self"),"Returns a copy of *this.");
cl.def("__deepcopy__", &deepcopy,bp::args("self","memo"),"Returns a deep copy of *this.");
cl.def("__copy__", &copy, bp::arg("self"), "Returns a copy of *this.");
cl.def("__deepcopy__", &deepcopy, bp::args("self", "memo"),
"Returns a deep copy of *this.");
}

private:
static C copy(const C& self) { return C(self); }
static C deepcopy(const C & self, bp::dict) { return C(self); }
static C deepcopy(const C& self, bp::dict) { return C(self); }
};
} // namespace eigenpy

Expand Down

0 comments on commit 52e13ce

Please sign in to comment.