Skip to content

Commit b7c2c76

Browse files
vidurv-nvidiamyurasov-nv
authored andcommitted
Fix lint and formatting issues from pre-commit
1 parent 91cf1b9 commit b7c2c76

File tree

2 files changed

+60
-12
lines changed

2 files changed

+60
-12
lines changed

source/isaaclab_newton/isaaclab_newton/cloner/newton_replicate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from pxr import Usd, UsdGeom
1717

1818
from isaaclab.physics import PhysicsManager
19-
2019
from isaaclab.physics.scene_data_requirements import VisualizerPrebuiltArtifacts
2120

2221
from isaaclab_newton.physics import NewtonManager

source/isaaclab_newton/test/physics/test_sdf_config.py

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import re
99
from unittest.mock import MagicMock, patch
1010

11-
import pytest
1211
from newton import GeoType, ModelBuilder, ShapeFlags
1312

1413

@@ -197,8 +196,18 @@ def test_shape_patterns_match_shape_label(self):
197196
builder = self._make_builder(
198197
bodies=["/World/Robot/base", "/World/Robot/arm"],
199198
shapes=[
200-
{"body_idx": 0, "label": "/World/Robot/base/gear_mesh", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
201-
{"body_idx": 1, "label": "/World/Robot/arm/plain_mesh", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
199+
{
200+
"body_idx": 0,
201+
"label": "/World/Robot/base/gear_mesh",
202+
"geo_type": GeoType.MESH,
203+
"flags": ShapeFlags.COLLIDE_SHAPES,
204+
},
205+
{
206+
"body_idx": 1,
207+
"label": "/World/Robot/arm/plain_mesh",
208+
"geo_type": GeoType.MESH,
209+
"flags": ShapeFlags.COLLIDE_SHAPES,
210+
},
202211
],
203212
)
204213
# Mock the mesh sources
@@ -232,9 +241,24 @@ def test_body_patterns_match_body_label(self):
232241
builder = self._make_builder(
233242
bodies=["/World/Robot/arm", "/World/Robot/base"],
234243
shapes=[
235-
{"body_idx": 0, "label": "/World/Robot/arm/mesh_a", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
236-
{"body_idx": 0, "label": "/World/Robot/arm/mesh_b", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
237-
{"body_idx": 1, "label": "/World/Robot/base/mesh_c", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
244+
{
245+
"body_idx": 0,
246+
"label": "/World/Robot/arm/mesh_a",
247+
"geo_type": GeoType.MESH,
248+
"flags": ShapeFlags.COLLIDE_SHAPES,
249+
},
250+
{
251+
"body_idx": 0,
252+
"label": "/World/Robot/arm/mesh_b",
253+
"geo_type": GeoType.MESH,
254+
"flags": ShapeFlags.COLLIDE_SHAPES,
255+
},
256+
{
257+
"body_idx": 1,
258+
"label": "/World/Robot/base/mesh_c",
259+
"geo_type": GeoType.MESH,
260+
"flags": ShapeFlags.COLLIDE_SHAPES,
261+
},
238262
],
239263
)
240264
for s in builder.shape_source:
@@ -268,8 +292,18 @@ def test_non_mesh_shapes_are_skipped(self):
268292
builder = self._make_builder(
269293
bodies=["/World/Robot/base"],
270294
shapes=[
271-
{"body_idx": 0, "label": "/World/Robot/base/box", "geo_type": GeoType.BOX, "flags": ShapeFlags.COLLIDE_SHAPES},
272-
{"body_idx": 0, "label": "/World/Robot/base/mesh", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
295+
{
296+
"body_idx": 0,
297+
"label": "/World/Robot/base/box",
298+
"geo_type": GeoType.BOX,
299+
"flags": ShapeFlags.COLLIDE_SHAPES,
300+
},
301+
{
302+
"body_idx": 0,
303+
"label": "/World/Robot/base/mesh",
304+
"geo_type": GeoType.MESH,
305+
"flags": ShapeFlags.COLLIDE_SHAPES,
306+
},
273307
],
274308
)
275309
for s in builder.shape_source:
@@ -302,7 +336,12 @@ def test_visual_shapes_skipped_when_use_visual_meshes_false(self):
302336
builder = self._make_builder(
303337
bodies=["/World/Robot/arm"],
304338
shapes=[
305-
{"body_idx": 0, "label": "/World/Robot/arm/visual", "geo_type": GeoType.MESH, "flags": ShapeFlags.VISIBLE},
339+
{
340+
"body_idx": 0,
341+
"label": "/World/Robot/arm/visual",
342+
"geo_type": GeoType.MESH,
343+
"flags": ShapeFlags.VISIBLE,
344+
},
306345
],
307346
)
308347
for s in builder.shape_source:
@@ -334,7 +373,12 @@ def test_margin_applied_when_set(self):
334373
builder = self._make_builder(
335374
bodies=["/World/Robot/arm"],
336375
shapes=[
337-
{"body_idx": 0, "label": "/World/Robot/arm/mesh", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
376+
{
377+
"body_idx": 0,
378+
"label": "/World/Robot/arm/mesh",
379+
"geo_type": GeoType.MESH,
380+
"flags": ShapeFlags.COLLIDE_SHAPES,
381+
},
338382
],
339383
)
340384
for s in builder.shape_source:
@@ -365,7 +409,12 @@ def test_margin_none_leaves_default(self):
365409
builder = self._make_builder(
366410
bodies=["/World/Robot/arm"],
367411
shapes=[
368-
{"body_idx": 0, "label": "/World/Robot/arm/mesh", "geo_type": GeoType.MESH, "flags": ShapeFlags.COLLIDE_SHAPES},
412+
{
413+
"body_idx": 0,
414+
"label": "/World/Robot/arm/mesh",
415+
"geo_type": GeoType.MESH,
416+
"flags": ShapeFlags.COLLIDE_SHAPES,
417+
},
369418
],
370419
)
371420
for s in builder.shape_source:

0 commit comments

Comments
 (0)