Convert directory fbcode/vision to use the Ruff Formatter

Summary:
Converts the directory specified to use the Ruff formatter in pyfmt

ruff_dog

If this diff causes merge conflicts when rebasing, please run
`hg status -n -0 --change . -I '**/*.{py,pyi}' | xargs -0 arc pyfmt`
on your diff, and amend any changes before rebasing onto latest.
That should help reduce or eliminate any merge conflicts.

allow-large-files

Reviewed By: bottler

Differential Revision: D66472063

fbshipit-source-id: 35841cb397e4f8e066e2159550d2f56b403b1bef
This commit is contained in:
Thomas Polasek
2024-11-26 02:38:20 -08:00
committed by Facebook GitHub Bot
parent f6c2ca6bfc
commit 055ab3a2e3
92 changed files with 121 additions and 191 deletions

View File

@@ -17,7 +17,6 @@ from .common_testing import get_random_cuda_device, TestCaseMixin
class TestAccumulatePoints(TestCaseMixin, unittest.TestCase):
# NAIVE PYTHON IMPLEMENTATIONS (USED FOR TESTING)
@staticmethod
def accumulate_alphacomposite_python(points_idx, alphas, features):
@@ -63,7 +62,6 @@ class TestAccumulatePoints(TestCaseMixin, unittest.TestCase):
for c in range(0, C):
for i in range(0, W):
for j in range(0, H):
for k in range(0, K):
n_idx = points_idx[b, k, j, i]
@@ -237,16 +235,16 @@ class TestAccumulatePoints(TestCaseMixin, unittest.TestCase):
[
# fmt: off
[
[0, 0, 0, 0], # noqa: E241, E201
[0, 0, 0, 0], # noqa: E241, E201
[0, -1, -1, -1], # noqa: E241, E201
[0, 1, 1, 0], # noqa: E241, E201
[0, 0, 0, 0], # noqa: E241, E201
[0, 1, 1, 0], # noqa: E241, E201
[0, 0, 0, 0], # noqa: E241, E201
],
[
[2, 2, 2, 2], # noqa: E241, E201
[2, 3, 3, 2], # noqa: E241, E201
[2, 3, 3, 2], # noqa: E241, E201
[2, 2, -1, 2], # noqa: E241, E201
[2, 2, 2, 2], # noqa: E241, E201
[2, 3, 3, 2], # noqa: E241, E201
[2, 3, 3, 2], # noqa: E241, E201
[2, 2, -1, 2], # noqa: E241, E201
],
# fmt: on
]