From cbd70cd711c55a1f5a454f007248298eaf8e4d79 Mon Sep 17 00:00:00 2001 From: Thomas Polasek Date: Fri, 6 Dec 2024 10:37:02 -0800 Subject: [PATCH] Convert FBCODE to use the Ruff Formatter 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 --- idb/common/plugin.py | 4 ++-- idb/grpc/xctest.py | 1 - idb/utils/contextlib.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/idb/common/plugin.py b/idb/common/plugin.py index 295ec4eac..9ec22ced1 100644 --- a/idb/common/plugin.py +++ b/idb/common/plugin.py @@ -52,7 +52,7 @@ def package_exists(package_name: str) -> bool: @overload def swallow_exceptions( - f: Callable[P, Awaitable[T]] + f: Callable[P, Awaitable[T]], ) -> Callable[P, Awaitable[T | None]]: ... @@ -61,7 +61,7 @@ def swallow_exceptions(f: Callable[P, T]) -> Callable[P, T | None]: ... def swallow_exceptions( - f: Callable[P, T] | Callable[P, Awaitable[T]] + f: Callable[P, T] | Callable[P, Awaitable[T]], ) -> Callable[P, T | None] | Callable[P, Awaitable[T | None]]: if asyncio.iscoroutinefunction(f): diff --git a/idb/grpc/xctest.py b/idb/grpc/xctest.py index b31b5c757..ed9971f47 100644 --- a/idb/grpc/xctest.py +++ b/idb/grpc/xctest.py @@ -132,7 +132,6 @@ def make_request( coverage_object = None if collect_coverage: - coverage_object = XctestRunRequest.CodeCoverage( collect=True, enable_continuous_coverage_collection=enable_continuous_coverage_collection, diff --git a/idb/utils/contextlib.py b/idb/utils/contextlib.py index 2177220c2..9a6d1ad26 100644 --- a/idb/utils/contextlib.py +++ b/idb/utils/contextlib.py @@ -228,7 +228,7 @@ async def __aexit__(self, typ, value, traceback): # noqa C901 def _asynccontextmanager( - func: Callable[..., AsyncIterator[_T]] + func: Callable[..., AsyncIterator[_T]], ) -> Callable[..., AsyncContextManager[_T]]: """@asynccontextmanager decorator. Typical usage: