mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-09-14 03:05:46 +08:00
Enable Pyrefly in fbcode/vision/fair/pytorch3d
Summary: Automated migration to enable Pyrefly type checking for `fbcode/vision/fair/pytorch3d`. - Added `python.set_pyrefly(True)` to PACKAGE file - Suppressed pre-existing type errors Pyrefly is Meta's next-generation Python type checker, replacing Pyre. If you encounter issues, you can revert the PACKAGE change by removing the `python.set_pyrefly(True)` line. #pyreupgrade Differential Revision: D113596106 fbshipit-source-id: a4caffc6c5622ea030fe296c3a64e45fa803f77e
This commit is contained in:
committed by
meta-codesync[bot]
parent
4daa00b41c
commit
32a33e2442
@@ -297,7 +297,11 @@ class FrameData(Mapping[str, Any]):
|
||||
depth_map = self.depth_map
|
||||
if depth_map is not None:
|
||||
clamp_bbox_xyxy_depth = rescale_bbox(
|
||||
clamp_bbox_xyxy, tuple(depth_map.shape[-2:]), effective_image_size_hw
|
||||
# pyrefly: ignore [bad-argument-type]
|
||||
clamp_bbox_xyxy,
|
||||
# pyrefly: ignore [bad-argument-type]
|
||||
tuple(depth_map.shape[-2:]),
|
||||
effective_image_size_hw,
|
||||
).long()
|
||||
self.depth_map = crop_around_box(
|
||||
depth_map,
|
||||
@@ -308,7 +312,11 @@ class FrameData(Mapping[str, Any]):
|
||||
depth_mask = self.depth_mask
|
||||
if depth_mask is not None:
|
||||
clamp_bbox_xyxy_depth = rescale_bbox(
|
||||
clamp_bbox_xyxy, tuple(depth_mask.shape[-2:]), effective_image_size_hw
|
||||
# pyrefly: ignore [bad-argument-type]
|
||||
clamp_bbox_xyxy,
|
||||
# pyrefly: ignore [bad-argument-type]
|
||||
tuple(depth_mask.shape[-2:]),
|
||||
effective_image_size_hw,
|
||||
).long()
|
||||
self.depth_mask = crop_around_box(
|
||||
depth_mask,
|
||||
@@ -453,6 +461,7 @@ class FrameDataBuilderBase(ReplaceableBase, Generic[FrameDataSubtype], ABC):
|
||||
"""
|
||||
|
||||
# To be initialised to FrameDataSubtype
|
||||
# pyrefly: ignore [invalid-annotation]
|
||||
frame_data_type: ClassVar[Type[FrameDataSubtype]]
|
||||
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user