Skip to content

Commit 950d64f

Browse files
generatedunixname89002005307016meta-codesync[bot]
authored andcommitted
Remove unused type error suppressions
Summary: This diff was automatically generated by the Pyre per-target upgrade tool. It removes `# pyre-fixme` or `pyrefly: ignore` comments that are no longer needed because the underlying type errors have been resolved. Note that it will also aim to ensure type checking runs cleanly, and will add suppressions to existing type errors. #pyreupgrade Differential Revision: D116559483 fbshipit-source-id: 1481c8e54120c28f0d549698c401afc54b6a942f
1 parent 24ff890 commit 950d64f

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

‎hand_tracking_toolkit/metrics.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,10 @@
6161
def _safe_div(x, y, eps: float = 1e-6, default_val: float = 0):
6262
if np.isscalar(x):
6363
assert np.isscalar(y)
64-
# pyre-fixme[58]: `<` is not supported for operand types `Union[bool, bytes,
6564
# complex, float, int, memoryview, np.generic, str]` and `float`.
6665
if y < eps:
6766
return default_val
6867
else:
69-
# pyre-fixme[58]: `/` is not supported for operand types `Union[bool,
7068
# bytes, complex, float, int, memoryview, np.generic, str]` and
7169
# `Union[bool, bytes, complex, float, int, memoryview, np.generic, str]`.
7270
return x / y

‎hand_tracking_toolkit/visualization.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def cat_images(imgs: List[npt.NDArray], vertically: bool) -> npt.NDArray:
154154
if vertically:
155155
start_h = 0
156156
for im in imgs:
157-
# pyre-fixme[16]: `int` has no attribute `__setitem__`.
158157
canvas[start_h : start_h + im.shape[0], : im.shape[1]] = im
159158
start_h += im.shape[0]
160159
else:
@@ -231,11 +230,9 @@ def visualize_keypoints_and_mesh(
231230
)
232231

233232
# blending
234-
# pyre-fixme[9]: alpha has type `float`; used as `ndarray[typing.Any,
235233
# dtype[typing.Any]]`.
236234
alpha = alpha * mask.astype(np.float32)
237235
image = (
238-
# pyre-ignore
239236
image.astype(np.float32) * (1 - alpha[..., None])
240237
+ rendering.astype(np.float32) * alpha[..., None]
241238
).astype(np.uint8)

0 commit comments

Comments
 (0)