apply Black 2024 style in fbcode (4/16)

Summary:
Formats the covered files with pyfmt.

paintitblack

Reviewed By: aleivag

Differential Revision: D54447727

fbshipit-source-id: 8844b1caa08de94d04ac4df3c768dbf8c865fd2f
This commit is contained in:
Amethyst Reese
2024-03-02 17:31:19 -08:00
committed by Facebook GitHub Bot
parent f34104cf6e
commit 3da7703c5a
31 changed files with 130 additions and 106 deletions

View File

@@ -61,9 +61,9 @@ class ExtendedSqlFrameAnnotation(SqlFrameAnnotation):
class ExtendedSqlIndexDataset(SqlIndexDataset):
frame_annotations_type: ClassVar[
Type[SqlFrameAnnotation]
] = ExtendedSqlFrameAnnotation
frame_annotations_type: ClassVar[Type[SqlFrameAnnotation]] = (
ExtendedSqlFrameAnnotation
)
class CanineFrameData(FrameData):
@@ -96,9 +96,9 @@ class CanineFrameDataBuilder(
class CanineSqlIndexDataset(SqlIndexDataset):
frame_annotations_type: ClassVar[
Type[SqlFrameAnnotation]
] = ExtendedSqlFrameAnnotation
frame_annotations_type: ClassVar[Type[SqlFrameAnnotation]] = (
ExtendedSqlFrameAnnotation
)
frame_data_builder_class_type: str = "CanineFrameDataBuilder"

View File

@@ -85,11 +85,11 @@ class TestFrameDataBuilder(TestCaseMixin, unittest.TestCase):
camera_quality_score=safe_as_tensor(
self.seq_annotation.viewpoint_quality_score, torch.float
),
point_cloud_quality_score=safe_as_tensor(
point_cloud.quality_score, torch.float
)
if point_cloud is not None
else None,
point_cloud_quality_score=(
safe_as_tensor(point_cloud.quality_score, torch.float)
if point_cloud is not None
else None
),
)
def test_frame_data_builder_args(self):

View File

@@ -168,7 +168,10 @@ def _make_random_json_dataset_map_provider_v2_data(
mask_path = os.path.join(maskdir, f"frame{i:05d}.png")
mask = np.zeros((H, W))
mask[H // 2 :, W // 2 :] = 1
Image.fromarray((mask * 255.0).astype(np.uint8), mode="L",).convert(
Image.fromarray(
(mask * 255.0).astype(np.uint8),
mode="L",
).convert(
"L"
).save(mask_path)

View File

@@ -222,10 +222,7 @@ class TestRendererBase(TestCaseMixin, unittest.TestCase):
np.testing.assert_allclose(
(delta**2) / 3
- (4 / 15)
* (
(delta**4 * (12 * mu**2 - delta**2))
/ (3 * mu**2 + delta**2) ** 2
),
* ((delta**4 * (12 * mu**2 - delta**2)) / (3 * mu**2 + delta**2) ** 2),
t_var.numpy(),
)
np.testing.assert_allclose(