Skip to content

Commit 5a1dd0b

Browse files
committed
pre-commit : run all
+ unittest/python/test_case.py : add ruff noqa E501
1 parent d85bd07 commit 5a1dd0b

File tree

10 files changed

+20
-26
lines changed

10 files changed

+20
-26
lines changed

bindings/python/pinocchio/robot_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def initFromMJCF(self, filename, *args, **kwargs):
6969
model=model,
7070
collision_model=collision_model,
7171
visual_model=visual_model,
72-
constraint_models=constraint_models
72+
constraint_models=constraint_models,
7373
)
7474

7575
def __init__(

include/pinocchio/algorithm/constrained-dynamics.hpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ namespace pinocchio
3030
typename Scalar,
3131
int Options,
3232
class ConstraintModel,
33-
template<typename, int>
34-
class JointCollectionTpl,
33+
template<typename, int> class JointCollectionTpl,
3534
class Allocator>
3635
PINOCCHIO_UNSUPPORTED_MESSAGE("The API will change towards more flexibility")
3736
inline void initConstraintDynamics(
@@ -81,8 +80,7 @@ namespace pinocchio
8180
template<
8281
typename Scalar,
8382
int Options,
84-
template<typename, int>
85-
class JointCollectionTpl,
83+
template<typename, int> class JointCollectionTpl,
8684
typename ConfigVectorType,
8785
typename TangentVectorType1,
8886
typename TangentVectorType2,
@@ -139,8 +137,7 @@ namespace pinocchio
139137
template<
140138
typename Scalar,
141139
int Options,
142-
template<typename, int>
143-
class JointCollectionTpl,
140+
template<typename, int> class JointCollectionTpl,
144141
typename ConfigVectorType,
145142
typename TangentVectorType1,
146143
typename TangentVectorType2,
@@ -165,8 +162,7 @@ namespace pinocchio
165162
template<
166163
typename Scalar,
167164
int Options,
168-
template<typename, int>
169-
class JointCollectionTpl,
165+
template<typename, int> class JointCollectionTpl,
170166
typename ConfigVectorType,
171167
typename TangentVectorType1,
172168
typename TangentVectorType2,

include/pinocchio/algorithm/constraints/constraint-data-base.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ namespace pinocchio
4444
os << shortname() << endl;
4545
}
4646

47-
friend std::ostream & operator<<(std::ostream & os, const ConstraintDataBase<Derived> & constraint)
47+
friend std::ostream &
48+
operator<<(std::ostream & os, const ConstraintDataBase<Derived> & constraint)
4849
{
4950
constraint.disp(os);
5051
return os;

include/pinocchio/algorithm/constraints/joint-limit-constraint.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ namespace pinocchio
341341
const ConstraintData & cdata,
342342
const Eigen::MatrixBase<VectorNLike> & diagonal_constraint_inertia,
343343
const ReferenceFrameTag<rf> reference_frame) const;
344-
344+
345345
/// \brief Returns the vector of the active indexes associated with a given row
346346
/// This vector is computed when calling the calc method.
347347
const VectorOfSize & getActiveSetIndexes() const

include/pinocchio/parsers/sdf/model.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,15 +529,15 @@ namespace pinocchio
529529

530530
urdfVisitor << "joint REVOLUTE with axis" << axis.transpose() << '\n';
531531
urdfVisitor.addJointAndBody(
532-
JointType::REVOLUTE, axis, parentFrameId, pMj, jointName, Y, cMj.inverse(),
533-
childName, max_effort, max_velocity, min_config, max_config, friction, damping);
532+
JointType::REVOLUTE, axis, parentFrameId, pMj, jointName, Y, cMj.inverse(), childName,
533+
max_effort, max_velocity, min_config, max_config, friction, damping);
534534
}
535535
else if (jointElement->template Get<std::string>("type") == "gearbox")
536536
{
537537
urdfVisitor << "joint GEARBOX with axis" << '\n';
538538
urdfVisitor.addJointAndBody(
539-
JointType::REVOLUTE, axis, parentFrameId, pMj, jointName, Y, cMj.inverse(),
540-
childName, max_effort, max_velocity, min_config, max_config, friction, damping);
539+
JointType::REVOLUTE, axis, parentFrameId, pMj, jointName, Y, cMj.inverse(), childName,
540+
max_effort, max_velocity, min_config, max_config, friction, damping);
541541
}
542542
else if (jointElement->template Get<std::string>("type") == "prismatic")
543543
{

unittest/python/bindings_admm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
import importlib.util
12
import unittest
23
from pathlib import Path
34

45
import numpy as np
56
import pinocchio as pin
67
from test_case import ContactSolverTestCase as TestCase
78

8-
import importlib.util
9-
109
coal_spec = importlib.util.find_spec("coal")
1110
coal_found = coal_spec is not None
1211

unittest/python/bindings_bilateral_constraint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import unittest
2+
23
import pinocchio as pin
34
from test_case import PinocchioTestCase as TestCase
45

unittest/python/bindings_mjcf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import importlib.util
12
import unittest
23
from pathlib import Path
34

45
import pinocchio as pin
56

6-
import importlib.util
7-
87
mujoco_spec = importlib.util.find_spec("mujoco")
98
mujoco_found = mujoco_spec is not None
109

unittest/python/bindings_pgs.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
import importlib.util
12
import unittest
23
from pathlib import Path
34

45
import numpy as np
56
import pinocchio as pin
67
from test_case import ContactSolverTestCase as TestCase
78

8-
import importlib.util
9-
109
coal_spec = importlib.util.find_spec("coal")
1110
coal_found = coal_spec is not None
1211

unittest/python/test_case.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1+
# ruff: noqa: E501
2+
import importlib.util
13
import unittest
24

3-
from pinocchio.utils import isapprox
4-
5-
import pinocchio as pin
65
import numpy as np
7-
8-
import importlib.util
6+
import pinocchio as pin
7+
from pinocchio.utils import isapprox
98

109
coal_spec = importlib.util.find_spec("coal")
1110
coal_found = coal_spec is not None

0 commit comments

Comments
 (0)