Skip to content

Commit 07654c4

Browse files
committed
Some typing fixes
1 parent eeedeae commit 07654c4

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

roboticstoolbox/robot/ETS.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ def __str__(self, q: Union[str, None] = None):
135135
# For et in the object, display it, data comes from properties
136136
# which come from the named tuple
137137
for et in self.data:
138-
139138
if et.isjoint:
140139
if q is not None:
141140
if et.jindex is None: # pragma: nocover this is no longer possible
@@ -605,7 +604,6 @@ def __getitem__(self, i):
605604
return self.data[i] # can be [2] or slice, eg. [3:5]
606605

607606
def __deepcopy__(self, memo):
608-
609607
new_data = []
610608

611609
for data in self:
@@ -835,7 +833,6 @@ def compile(self) -> "ETS":
835833
ets = ETS()
836834

837835
for et in self:
838-
839836
if et.isjoint:
840837
# a joint
841838
if const is not None:
@@ -1379,7 +1376,6 @@ def cross(a, b):
13791376

13801377
for j in range(n):
13811378
for i in range(j, n):
1382-
13831379
H[j, :3, i] = cross(J0[3:, j], J0[:3, i])
13841380
H[j, 3:, i] = cross(J0[3:, j], J0[3:, i])
13851381

@@ -1484,7 +1480,6 @@ def cross(a, b):
14841480

14851481
for j in range(n):
14861482
for i in range(j, n):
1487-
14881483
H[j, :3, i] = cross(Je[3:, j], Je[:3, i])
14891484
H[j, 3:, i] = cross(Je[3:, j], Je[3:, i])
14901485

@@ -1858,7 +1853,6 @@ def add_pdi(pdi):
18581853

18591854
# The length of dT correspods to the number of derivatives we have calculated
18601855
while len(dT) != n:
1861-
18621856
# Add to the start of the tensor size list
18631857
size.insert(0, self.n)
18641858

@@ -1889,7 +1883,6 @@ def add_pdi(pdi):
18891883
# We need to loop n^c times
18901884
# There are n^c columns to calculate
18911885
for _ in range(self.n**c):
1892-
18931886
# Allocate the rotation and translation components
18941887
rot = np.zeros(3)
18951888
trn = np.zeros(3)
@@ -3190,7 +3183,6 @@ def compile(self) -> "ETS2":
31903183
ets = ETS2()
31913184

31923185
for et in self:
3193-
31943186
if et.isjoint:
31953187
# a joint
31963188
if const is not None:
@@ -3393,8 +3385,7 @@ def eval(
33933385
def jacob0(
33943386
self,
33953387
q: ArrayLike,
3396-
):
3397-
3388+
) -> NDArray:
33983389
# very inefficient implementation, just put a 1 in last row
33993390
# if its a rotation joint
34003391
q = getvector(q)

roboticstoolbox/tools/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"""
55

66
from typing import Tuple, Union, List, Set
7-
87
from numpy import ndarray
98

109
NDArray = ndarray

0 commit comments

Comments
 (0)