Skip to content

Commit 537d325

Browse files
oprypincopybara-github
authored andcommitted
Replace # pytype: disable suppressions with # pyrefly: ignore
PiperOrigin-RevId: 993654001
1 parent 378e9b7 commit 537d325

25 files changed

Lines changed: 130 additions & 130 deletions

‎tensorflow_graphics/geometry/transformation/axis_angle.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def from_euler(angles: type_alias.TensorLike,
7373
`[A1, ..., An, 1]`, where the first tensor represents the axis, and the
7474
second represents the angle. The resulting axis is a normalized vector.
7575
"""
76-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
76+
with tf.name_scope(name):
7777
quaternion = quaternion_lib.from_euler(angles)
7878
return from_quaternion(quaternion)
7979

@@ -109,7 +109,7 @@ def from_euler_with_small_angles_approximation(
109109
`[A1, ..., An, 1]`, where the first tensor represents the axis, and the
110110
second represents the angle. The resulting axis is a normalized vector.
111111
"""
112-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
112+
with tf.name_scope(name):
113113
quaternion = quaternion_lib.from_euler_with_small_angles_approximation(
114114
angles)
115115
return from_quaternion(quaternion)
@@ -136,7 +136,7 @@ def from_quaternion(quaternion: type_alias.TensorLike,
136136
Raises:
137137
ValueError: If the shape of `quaternion` is not supported.
138138
"""
139-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
139+
with tf.name_scope(name):
140140
quaternion = tf.convert_to_tensor(value=quaternion)
141141

142142
shape.check_static(
@@ -180,7 +180,7 @@ def from_rotation_matrix(rotation_matrix: type_alias.TensorLike,
180180
Raises:
181181
ValueError: If the shape of `rotation_matrix` is not supported.
182182
"""
183-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
183+
with tf.name_scope(name):
184184
rotation_matrix = tf.convert_to_tensor(value=rotation_matrix)
185185

186186
shape.check_static(
@@ -218,7 +218,7 @@ def inverse(axis: type_alias.TensorLike,
218218
Raises:
219219
ValueError: If the shape of `axis` or `angle` is not supported.
220220
"""
221-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
221+
with tf.name_scope(name):
222222
axis = tf.convert_to_tensor(value=axis)
223223
angle = tf.convert_to_tensor(value=angle)
224224

@@ -256,7 +256,7 @@ def is_normalized(axis: type_alias.TensorLike,
256256
A tensor of shape `[A1, ..., An, 1]`, where False indicates that the axis is
257257
not normalized.
258258
"""
259-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
259+
with tf.name_scope(name):
260260
axis = tf.convert_to_tensor(value=axis)
261261
angle = tf.convert_to_tensor(value=angle)
262262

@@ -305,7 +305,7 @@ def rotate(point: type_alias.TensorLike,
305305
ValueError: If `point`, `axis`, or `angle` are of different shape or if
306306
their respective shape is not supported.
307307
"""
308-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
308+
with tf.name_scope(name):
309309
point = tf.convert_to_tensor(value=point)
310310
axis = tf.convert_to_tensor(value=axis)
311311
angle = tf.convert_to_tensor(value=angle)

‎tensorflow_graphics/geometry/transformation/dual_quaternion.py‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def conjugate(dual_quaternion: type_alias.TensorLike,
6363
Raises:
6464
ValueError: If the shape of `dual_quaternion` is not supported.
6565
"""
66-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
66+
with tf.name_scope(name):
6767
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)
6868

6969
shape.check_static(
@@ -97,7 +97,7 @@ def multiply(dual_quaternion1: type_alias.TensorLike,
9797
Returns:
9898
A tensor of shape `[A1, ..., An, 8]` representing dual quaternions.
9999
"""
100-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
100+
with tf.name_scope(name):
101101
dual_quaternion1 = tf.convert_to_tensor(value=dual_quaternion1)
102102
dual_quaternion2 = tf.convert_to_tensor(value=dual_quaternion2)
103103

@@ -144,7 +144,7 @@ def inverse(dual_quaternion: type_alias.TensorLike,
144144
Raises:
145145
ValueError: If the shape of `dual quaternion` is not supported.
146146
"""
147-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
147+
with tf.name_scope(name):
148148
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)
149149

150150
shape.check_static(
@@ -193,7 +193,7 @@ def norm(dual_quaternion: type_alias.TensorLike,
193193
Raises:
194194
ValueError: If the shape of `dual quaternion` is not supported.
195195
"""
196-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
196+
with tf.name_scope(name):
197197
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)
198198

199199
shape.check_static(
@@ -234,7 +234,7 @@ def is_normalized(dual_quaternion: type_alias.TensorLike,
234234
Raises:
235235
ValueError: If the shape of `dual_quaternion` is not supported.
236236
"""
237-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
237+
with tf.name_scope(name):
238238
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)
239239

240240
shape.check_static(
@@ -278,7 +278,7 @@ def from_rotation_translation(
278278
Raises:
279279
ValueError: If the shape of `rotation_matrix` is not supported.
280280
"""
281-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
281+
with tf.name_scope(name):
282282
rotation_quaternion = tf.convert_to_tensor(value=rotation_quaternion)
283283
translation_vector = tf.convert_to_tensor(value=translation_vector)
284284

@@ -319,7 +319,7 @@ def to_rotation_translation(
319319
A tuple with a `[A1, ..., An, 4]`-tensor for rotation in quaternion form,
320320
and a `[A1, ..., An, 3]`-tensor for translation, in that order.
321321
"""
322-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
322+
with tf.name_scope(name):
323323
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)
324324

325325
shape.check_static(
@@ -362,7 +362,7 @@ def from_axis_angle_translation(axis: type_alias.TensorLike,
362362
ValueError: If the shape of `axis`, `angle`, or `translation_vector`
363363
is not supported.
364364
"""
365-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
365+
with tf.name_scope(name):
366366
axis = tf.convert_to_tensor(value=axis)
367367
angle = tf.convert_to_tensor(value=angle)
368368
translation_vector = tf.convert_to_tensor(value=translation_vector)
@@ -415,7 +415,7 @@ def conjugate_dual(
415415
Raises:
416416
ValueError: If the shape of `dual_quaternion` is not supported.
417417
"""
418-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
418+
with tf.name_scope(name):
419419
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)
420420

421421
shape.check_static(
@@ -442,7 +442,7 @@ def point_to_dual_quaternion(
442442
Returns:
443443
The dual quaternion representation of `point`.
444444
"""
445-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
445+
with tf.name_scope(name):
446446
point = tf.convert_to_tensor(value=point)
447447

448448
shape.check_static(

‎tensorflow_graphics/geometry/transformation/euler.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def from_axis_angle(axis: type_alias.TensorLike,
6060
A tensor of shape `[A1, ..., An, 3]`, where the last dimension represents
6161
the three Euler angles.
6262
"""
63-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
63+
with tf.name_scope(name):
6464
return from_quaternion(quaternion.from_axis_angle(axis, angle))
6565

6666

@@ -98,7 +98,7 @@ def gimbal_lock(r01, r02, r20, eps_addition):
9898
angles = tf.stack((theta_x, theta_y, theta_z), axis=-1)
9999
return angles
100100

101-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
101+
with tf.name_scope(name):
102102
quaternions = tf.convert_to_tensor(value=quaternions)
103103

104104
shape.check_static(
@@ -193,7 +193,7 @@ def gimbal_lock(rotation_matrix, r20, eps_addition):
193193
angles = tf.stack((theta_x, theta_y, theta_z), axis=-1)
194194
return angles
195195

196-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
196+
with tf.name_scope(name):
197197
rotation_matrix = tf.convert_to_tensor(value=rotation_matrix)
198198

199199
shape.check_static(
@@ -232,7 +232,7 @@ def inverse(euler_angle: type_alias.TensorLike,
232232
Raises:
233233
ValueError: If the shape of `euler_angle` is not supported.
234234
"""
235-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
235+
with tf.name_scope(name):
236236
euler_angle = tf.convert_to_tensor(value=euler_angle)
237237

238238
shape.check_static(

‎tensorflow_graphics/geometry/transformation/linear_blend_skinning.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def blend(points: type_alias.TensorLike,
5656
Raises:
5757
ValueError: If the shape of the input tensors are not supported.
5858
"""
59-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
59+
with tf.name_scope(name):
6060
points = tf.convert_to_tensor(value=points)
6161
skinning_weights = tf.convert_to_tensor(value=skinning_weights)
6262
bone_rotations = tf.convert_to_tensor(value=bone_rotations)

‎tensorflow_graphics/geometry/transformation/look_at.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def right_handed(camera_position: type_alias.TensorLike,
5050
A tensor of shape `[A1, ..., An, 4, 4]`, containing right handed look at
5151
matrices.
5252
"""
53-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
53+
with tf.name_scope(name):
5454
camera_position = tf.convert_to_tensor(value=camera_position)
5555
look_at = tf.convert_to_tensor(value=look_at)
5656
up_vector = tf.convert_to_tensor(value=up_vector)

‎tensorflow_graphics/geometry/transformation/quaternion.py‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def between_two_vectors_3d(vector1: type_alias.TensorLike,
9898
Raises:
9999
ValueError: If the shape of `vector1` or `vector2` is not supported.
100100
"""
101-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
101+
with tf.name_scope(name):
102102
vector1 = tf.convert_to_tensor(value=vector1)
103103
vector2 = tf.convert_to_tensor(value=vector2)
104104

@@ -154,7 +154,7 @@ def conjugate(quaternion: type_alias.TensorLike,
154154
Raises:
155155
ValueError: If the shape of `quaternion` is not supported.
156156
"""
157-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
157+
with tf.name_scope(name):
158158
quaternion = tf.convert_to_tensor(value=quaternion)
159159

160160
shape.check_static(
@@ -187,7 +187,7 @@ def from_axis_angle(axis: type_alias.TensorLike,
187187
Raises:
188188
ValueError: If the shape of `axis` or `angle` is not supported.
189189
"""
190-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
190+
with tf.name_scope(name):
191191
axis = tf.convert_to_tensor(value=axis)
192192
angle = tf.convert_to_tensor(value=angle)
193193

@@ -229,7 +229,7 @@ def from_euler(angles: type_alias.TensorLike,
229229
Raises:
230230
ValueError: If the shape of `angles` is not supported.
231231
"""
232-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
232+
with tf.name_scope(name):
233233
angles = tf.convert_to_tensor(value=angles)
234234

235235
shape.check_static(
@@ -272,7 +272,7 @@ def from_euler_with_small_angles_approximation(
272272
Raises:
273273
ValueError: If the shape of `angles` is not supported.
274274
"""
275-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
275+
with tf.name_scope(name):
276276
angles = tf.convert_to_tensor(value=angles)
277277

278278
shape.check_static(
@@ -310,7 +310,7 @@ def from_rotation_matrix(rotation_matrix: type_alias.TensorLike,
310310
Raises:
311311
ValueError: If the shape of `rotation_matrix` is not supported.
312312
"""
313-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
313+
with tf.name_scope(name):
314314
rotation_matrix = tf.convert_to_tensor(value=rotation_matrix)
315315

316316
shape.check_static(
@@ -395,7 +395,7 @@ def inverse(quaternion: type_alias.TensorLike,
395395
Raises:
396396
ValueError: If the shape of `quaternion` is not supported.
397397
"""
398-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
398+
with tf.name_scope(name):
399399
quaternion = tf.convert_to_tensor(value=quaternion)
400400

401401
shape.check_static(
@@ -429,7 +429,7 @@ def is_normalized(quaternion: type_alias.TensorLike,
429429
Raises:
430430
ValueError: If the shape of `quaternion` is not supported.
431431
"""
432-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
432+
with tf.name_scope(name):
433433
quaternion = tf.convert_to_tensor(value=quaternion)
434434

435435
shape.check_static(
@@ -463,7 +463,7 @@ def normalize(quaternion: type_alias.TensorLike,
463463
Raises:
464464
ValueError: If the shape of `quaternion` is not supported.
465465
"""
466-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
466+
with tf.name_scope(name):
467467
quaternion = tf.convert_to_tensor(value=quaternion)
468468

469469
shape.check_static(
@@ -494,7 +494,7 @@ def multiply(quaternion1: type_alias.TensorLike,
494494
Raises:
495495
ValueError: If the shape of `quaternion1` or `quaternion2` is not supported.
496496
"""
497-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
497+
with tf.name_scope(name):
498498
quaternion1 = tf.convert_to_tensor(value=quaternion1)
499499
quaternion2 = tf.convert_to_tensor(value=quaternion2)
500500

@@ -526,7 +526,7 @@ def normalized_random_uniform(quaternion_shape: List[int],
526526
A tensor of shape `[quaternion_shape[0],...,quaternion_shape[-1], 4]`
527527
representing random normalized quaternions.
528528
"""
529-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
529+
with tf.name_scope(name):
530530
quaternion_shape = tf.convert_to_tensor(
531531
value=quaternion_shape, dtype=tf.int32)
532532
quaternion_shape = tf.concat((quaternion_shape, tf.constant([4])), axis=0)
@@ -594,7 +594,7 @@ def rotate(point: type_alias.TensorLike,
594594
Raises:
595595
ValueError: If the shape of `point` or `quaternion` is not supported.
596596
"""
597-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
597+
with tf.name_scope(name):
598598
point = tf.convert_to_tensor(value=point)
599599
quaternion = tf.convert_to_tensor(value=quaternion)
600600

@@ -642,7 +642,7 @@ def relative_angle(quaternion1: type_alias.TensorLike,
642642
Raises:
643643
ValueError: If the shape of `quaternion1` or `quaternion2` is not supported.
644644
"""
645-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
645+
with tf.name_scope(name):
646646
quaternion1 = tf.convert_to_tensor(value=quaternion1)
647647
quaternion2 = tf.convert_to_tensor(value=quaternion2)
648648

‎tensorflow_graphics/geometry/transformation/rotation_matrix_2d.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def from_euler(angle: type_alias.TensorLike,
7777
Raises:
7878
ValueError: If the shape of `angle` is not supported.
7979
"""
80-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
80+
with tf.name_scope(name):
8181
angle = tf.convert_to_tensor(value=angle)
8282

8383
shape.check_static(
@@ -132,7 +132,7 @@ def from_euler_with_small_angles_approximation(
132132
Raises:
133133
ValueError: If the shape of `angle` is not supported.
134134
"""
135-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
135+
with tf.name_scope(name):
136136
angles = tf.convert_to_tensor(value=angles)
137137

138138
shape.check_static(
@@ -166,7 +166,7 @@ def inverse(matrix: type_alias.TensorLike,
166166
Raises:
167167
ValueError: If the shape of `matrix` is not supported.
168168
"""
169-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
169+
with tf.name_scope(name):
170170
matrix = tf.convert_to_tensor(value=matrix)
171171

172172
shape.check_static(
@@ -201,7 +201,7 @@ def is_valid(matrix: type_alias.TensorLike,
201201
A tensor of type `bool` and shape `[A1, ..., An, 1]` where False indicates
202202
that the input is not a valid rotation matrix.
203203
"""
204-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
204+
with tf.name_scope(name):
205205
matrix = tf.convert_to_tensor(value=matrix)
206206

207207
shape.check_static(
@@ -236,7 +236,7 @@ def rotate(point: type_alias.TensorLike,
236236
Raises:
237237
ValueError: If the shape of `point` or `matrix` is not supported.
238238
"""
239-
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
239+
with tf.name_scope(name):
240240
point = tf.convert_to_tensor(value=point)
241241
matrix = tf.convert_to_tensor(value=matrix)
242242

0 commit comments

Comments
 (0)