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 658d0aa commit df903da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions later/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def cancel(fut: asyncio.Future) -> None:


def as_task(
func: Callable[TParams, Coroutine[object, object, T]]
func: Callable[TParams, Coroutine[object, object, T]],
) -> Callable[TParams, asyncio.Task[T]]:
"""
Decorate a function, So that when called it is wrapped in a task
Expand Down Expand Up @@ -535,7 +535,7 @@ def herd(
"""

def decorator(
fn: Callable[TParams, Coroutine[object, object, T]]
fn: Callable[TParams, Coroutine[object, object, T]],
) -> Callable[TParams, Coroutine[object, object, T]]:
local: threading.local = threading.local()

Expand Down
2 changes: 0 additions & 2 deletions later/tests/unittest/test_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

class TestAsyncContextManagerMock(TestCase):
async def test_return_value(self) -> None:

mock = AsyncContextManager(return_value=10)

async with mock() as val:
Expand All @@ -45,7 +44,6 @@ async def test_as_instance(self) -> None:
self.assertEqual(val, 10)

async def test_created_but_not_aentered(self) -> None:

mock = AsyncContextManager()

m = mock()
Expand Down
1 change: 1 addition & 0 deletions later/unittest/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
been awaited. Any time asyncio calls logger.error() it is considered a
test failure.
"""

from __future__ import annotations

import asyncio
Expand Down

0 comments on commit df903da

Please sign in to comment.