Skip to content

Commit

Permalink
Convert FBCODE to use the Ruff Formatter
Browse files Browse the repository at this point in the history
Summary:
Converts the directory specified to use the Ruff formatter. This is the last big diff to convert all of Fbcode to Ruff.

pomsky_fix_bugs

drop-conflicts
bypass-github-export-checks
allow-large-files

Reviewed By: amyreese

Differential Revision: D66886610

fbshipit-source-id: 8276a7f6164efec189ca0b87e535543ed5bc3615
  • Loading branch information
Thomas Polasek authored and facebook-github-bot committed Dec 6, 2024
1 parent 3f1f5b3 commit d8e7897
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
6 changes: 4 additions & 2 deletions watchman/integration/eden/test_eden_glob_upper_bound.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ def test_eden_since_upper_bound_case_insensitive(self) -> None:
["mixedCASE/file1", "MIXEDcase/file2"],
)
self.assertGlobUpperBound(
# We can't bound this query with a glob on a case-sensitive FS.
(None if self.isCaseSensitiveMount(root) else {"mixedcase/**"})
(
# We can't bound this query with a glob on a case-sensitive FS.
None if self.isCaseSensitiveMount(root) else {"mixedcase/**"}
)
)

def test_eden_since_upper_bound_includedotfiles(self) -> None:
Expand Down
1 change: 0 additions & 1 deletion watchman/integration/eden/test_eden_unmount.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def populate(repo):

class TestEdenUnmount(WatchmanEdenTestCase.WatchmanEdenTestCase):
def test_eden_unmount(self) -> None:

root = self.makeEdenMount(populate)
self.watchmanCommand("watch", root)

Expand Down
1 change: 0 additions & 1 deletion watchman/integration/lib/path_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
if os.name == "nt":

def open_file_win(path):

create_file = ctypes.windll.kernel32.CreateFileW

c_path = ctypes.create_unicode_buffer(path)
Expand Down
1 change: 0 additions & 1 deletion watchman/integration/test_dir_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

@WatchmanTestCase.expand_matrix
class TestDirMove(WatchmanTestCase.WatchmanTestCase):

# testing this is flaky at best on windows due to latency
# and exclusivity of file handles, so skip it.
def checkOSApplicability(self) -> None:
Expand Down
8 changes: 6 additions & 2 deletions watchman/integration/test_path_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def test_path_generator_case(self) -> None:

self.assertFileListsEqual(
self.watchmanCommand(
"query", root, {"fields": ["name"], "path": ["foo"]} # not Foo!
"query",
root,
{"fields": ["name"], "path": ["foo"]}, # not Foo!
)["files"],
[],
message="Case insensitive matching not implemented \
Expand Down Expand Up @@ -89,7 +91,9 @@ def test_path_generator_relative_root(self) -> None:

self.assertFileListsEqual(
self.watchmanCommand(
"query", root, {"fields": ["name"], "path": ["foo"]} # not Foo!
"query",
root,
{"fields": ["name"], "path": ["foo"]}, # not Foo!
)["files"],
[],
message="Case insensitive matching not implemented \
Expand Down
2 changes: 1 addition & 1 deletion watchman/python/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
)
)

PILE_OF_POO = "\U0001F4A9"
PILE_OF_POO = "\U0001f4a9"
NON_UTF8_STRING = b"\xff\xff\xff"


Expand Down
1 change: 0 additions & 1 deletion watchman/test/async/AsyncWatchmanTestCase.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def touch_relative(self, base, *fname):
self.touch(fname, None)

def watchman_command(self, *args):

task = asyncio.wait_for(self.client.query(*args), 10)
return self.loop.run_until_complete(task)

Expand Down

0 comments on commit d8e7897

Please sign in to comment.