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] committed Mar 13, 2024
1 parent 2f96369 commit 34c8269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 1 addition & 4 deletions src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,7 @@ PYBIND11_MODULE(_core, m) {
overload_cast<GenCrossSectionPtr, GenEvent>(&GenEvent::cross_section),
&GenEvent::set_cross_section, DOC(GenEvent.cross_section))
.def_property(
"attributes",
[](GenEvent& self) {
return AttributesView{&self, 0};
},
"attributes", [](GenEvent& self) { return AttributesView{&self, 0}; },
[](GenEvent& self, py::dict obj) {
auto amv = AttributesView{&self, 0};
py::cast(amv).attr("clear")();
Expand Down
11 changes: 4 additions & 7 deletions src/repr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,10 @@ std::ostream& repr_ostream(std::ostream& os, const HepMC3::GenEvent& x) {
// incomplete:
// missing comparison of GenHeavyIon, GenPdfInfo, GenCrossSection

os << "<GenEvent "
<< "momentum_unit=" << x.momentum_unit() << ", "
<< "length_unit=" << x.length_unit() << ", "
<< "event_number=" << x.event_number() << ", "
<< "particles=" << x.particles().size() << ", "
<< "vertices=" << x.vertices().size() << ", "
<< "run_info=";
os << "<GenEvent " << "momentum_unit=" << x.momentum_unit() << ", "
<< "length_unit=" << x.length_unit() << ", " << "event_number=" << x.event_number()
<< ", " << "particles=" << x.particles().size() << ", "
<< "vertices=" << x.vertices().size() << ", " << "run_info=";
repr_ostream(os, x.run_info()) << ">";
return os;
}

0 comments on commit 34c8269

Please sign in to comment.