Skip to content

Commit 178955c

Browse files
committed
Linting
1 parent 622af53 commit 178955c

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

vmas/scenarios/ball_trajectory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
3939
drag=0,
4040
)
4141
# Add agents
42-
agent = Agent(name=f"agent 0", shape=Sphere(self.agent_radius), drag=0.25)
42+
agent = Agent(name="agent 0", shape=Sphere(self.agent_radius), drag=0.25)
4343
world.add_agent(agent)
44-
agent = Agent(name=f"agent 1", shape=Sphere(self.agent_radius), drag=0.25)
44+
agent = Agent(name="agent 1", shape=Sphere(self.agent_radius), drag=0.25)
4545
world.add_agent(agent)
4646

4747
self.ball = Landmark(

vmas/scenarios/buzz_wire.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
3939
)
4040
# Add agents
4141
agent = Agent(
42-
name=f"agent 0",
42+
name="agent 0",
4343
shape=Sphere(self.agent_radius),
4444
u_multiplier=1,
4545
mass=1,
4646
)
4747
world.add_agent(agent)
4848
agent = Agent(
49-
name=f"agent 1",
49+
name="agent 1",
5050
shape=Sphere(self.agent_radius),
5151
u_multiplier=1,
5252
mass=1,

vmas/scenarios/debug/asym_joint.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# ProrokLab (https://www.proroklab.org/)
33
# All rights reserved.
44
import math
5-
from typing import Dict
5+
import typing
6+
from typing import Dict, List
67

78
import torch
89
from torch import Tensor
@@ -13,6 +14,9 @@
1314
from vmas.simulator.scenario import BaseScenario
1415
from vmas.simulator.utils import Color
1516

17+
if typing.TYPE_CHECKING:
18+
from vmas.simulator.rendering import Geom
19+
1620

1721
def get_line_angle_0_90(rot: Tensor):
1822
angle = torch.abs(rot) % torch.pi

vmas/scenarios/joint_passage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
9696

9797
# Add agents
9898
agent = Agent(
99-
name=f"agent 0",
99+
name="agent 0",
100100
shape=Sphere(self.agent_radius),
101101
obs_noise=self.obs_noise,
102102
render_action=True,
@@ -109,7 +109,7 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
109109
world.add_agent(agent)
110110

111111
agent = Agent(
112-
name=f"agent 1",
112+
name="agent 1",
113113
shape=Sphere(self.agent_radius),
114114
mass=1 if self.asym_package else self.mass_ratio,
115115
color=Color.BLUE,

vmas/scenarios/joint_passage_size.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
9999

100100
# Add agents
101101
agent = Agent(
102-
name=f"agent 0",
102+
name="agent 0",
103103
shape=Sphere(self.agent_radius),
104104
u_range=0.5,
105105
obs_noise=self.obs_noise,
@@ -111,7 +111,7 @@ def make_world(self, batch_dim: int, device: torch.device, **kwargs):
111111
)
112112
world.add_agent(agent)
113113
agent = Agent(
114-
name=f"agent 1",
114+
name="agent 1",
115115
shape=Sphere(self.agent_radius_2),
116116
u_range=0.5,
117117
mass=1 if self.asym_package else self.mass_ratio,

vmas/scenarios/navigation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Copyright (c) 2022.
22
# ProrokLab (https://www.proroklab.org/)
33
# All rights reserved.
4-
from typing import Dict, Callable
4+
import typing
5+
from typing import Dict, Callable, List
56

67
import torch
78
from torch import Tensor
@@ -11,6 +12,9 @@
1112
from vmas.simulator.scenario import BaseScenario
1213
from vmas.simulator.utils import Color, ScenarioUtils
1314

15+
if typing.TYPE_CHECKING:
16+
from vmas.simulator.rendering import Geom
17+
1418

1519
class Scenario(BaseScenario):
1620
def make_world(self, batch_dim: int, device: torch.device, **kwargs):

vmas/simulator/core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,6 @@ def _get_intersection_point_line_line(self, point_a1, point_a2, point_b1, point_
19081908
u_in_range = (0 <= u) * (u <= 1)
19091909

19101910
cross_r_s_is_zero = cross_r_s == 0
1911-
cross_q_minus_p_r_is_zero = cross_q_minus_p_r == 0
19121911

19131912
distance = torch.full(
19141913
(self.batch_dim,), float("inf"), device=self.device, dtype=torch.float32

0 commit comments

Comments
 (0)