Skip to content

Commit 5c11420

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a5ff1ee commit 5c11420

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

doc/python/doxygen_xml_parser.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -622,9 +622,9 @@ def write(self, output):
622622
)
623623
output.out(
624624
template_member_func_doc.format(
625-
template="template <{}>\n".format(tplargs)
626-
if len(tplargs) > 0
627-
else "",
625+
template=(
626+
"template <{}>\n".format(tplargs) if len(tplargs) > 0 else ""
627+
),
628628
rettype=member.s_rettype(),
629629
classname_prefix=classname_prefix,
630630
argsstring=member.s_prototypeArgs(),
@@ -658,9 +658,9 @@ def write(self, output):
658658
)
659659
output.out(
660660
template_member_func_args.format(
661-
template="template <{}>\n".format(tplargs)
662-
if len(tplargs) > 0
663-
else "",
661+
template=(
662+
"template <{}>\n".format(tplargs) if len(tplargs) > 0 else ""
663+
),
664664
rettype=member.s_rettype(),
665665
n=n_args + 1,
666666
default_args=default_args,
@@ -772,9 +772,9 @@ def write(self):
772772
)
773773
self.output.out(
774774
template_static_func_doc.format(
775-
template="template <{}>\n".format(tplargs)
776-
if len(tplargs) > 0
777-
else "",
775+
template=(
776+
"template <{}>\n".format(tplargs) if len(tplargs) > 0 else ""
777+
),
778778
rettype=member.s_rettype(),
779779
argsstring=member.s_prototypeArgs(),
780780
body=body,

test/python_unit/geometric_shapes.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ def test_cylinder(self):
120120
V_ref = cylinder.radius * cylinder.radius * np.pi * 2.0 * cylinder.halfLength
121121
self.assertApprox(V, V_ref)
122122
I0 = cylinder.computeMomentofInertia()
123-
Ix_ref = (
124-
V_ref * (3 * cylinder.radius**2 + 4 * cylinder.halfLength**2) / 12.0
125-
)
123+
Ix_ref = V_ref * (3 * cylinder.radius**2 + 4 * cylinder.halfLength**2) / 12.0
126124
Iz_ref = V_ref * cylinder.radius**2 / 2.0
127125
I0_ref = np.diag([Ix_ref, Ix_ref, Iz_ref])
128126
self.assertApprox(I0, I0_ref)

0 commit comments

Comments
 (0)