From 1db11413771a1ae00389ff9e457e7219471fb270 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 28 Oct 2024 20:09:05 -0700 Subject: [PATCH] Format --- src/py/reactpy/reactpy/_warnings.py | 2 +- src/py/reactpy/reactpy/core/events.py | 2 +- src/py/reactpy/reactpy/core/layout.py | 2 +- src/py/reactpy/reactpy/utils.py | 2 +- src/py/reactpy/tests/test_backend/test_all.py | 5 ++++- src/py/reactpy/tests/test_core/test_events.py | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/py/reactpy/reactpy/_warnings.py b/src/py/reactpy/reactpy/_warnings.py index c4520604d..dc6d2fa1f 100644 --- a/src/py/reactpy/reactpy/_warnings.py +++ b/src/py/reactpy/reactpy/_warnings.py @@ -13,7 +13,7 @@ def warn(*args: Any, **kwargs: Any) -> Any: if TYPE_CHECKING: - warn = _warn # noqa: F811 + warn = _warn def _frame_depth_in_module() -> int: diff --git a/src/py/reactpy/reactpy/core/events.py b/src/py/reactpy/reactpy/core/events.py index f715b7e9d..2a193ec6b 100644 --- a/src/py/reactpy/reactpy/core/events.py +++ b/src/py/reactpy/reactpy/core/events.py @@ -109,7 +109,7 @@ def __init__( self.stop_propagation = stop_propagation self.target = target - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: undefined = object() for attr in ( "function", diff --git a/src/py/reactpy/reactpy/core/layout.py b/src/py/reactpy/reactpy/core/layout.py index f45becf7a..88cb2fa35 100644 --- a/src/py/reactpy/reactpy/core/layout.py +++ b/src/py/reactpy/reactpy/core/layout.py @@ -89,7 +89,7 @@ async def __aenter__(self) -> Layout: return self - async def __aexit__(self, *exc: Any) -> None: + async def __aexit__(self, *exc: object) -> None: root_csid = self._root_life_cycle_state_id root_model_state = self._model_states_by_life_cycle_state_id[root_csid] diff --git a/src/py/reactpy/reactpy/utils.py b/src/py/reactpy/reactpy/utils.py index 5624846a4..a20194902 100644 --- a/src/py/reactpy/reactpy/utils.py +++ b/src/py/reactpy/reactpy/utils.py @@ -43,7 +43,7 @@ def set_current(self, new: _RefValue) -> _RefValue: self.current = new return old - def __eq__(self, other: Any) -> bool: + def __eq__(self, other: object) -> bool: try: return isinstance(other, Ref) and (other.current == self.current) except AttributeError: diff --git a/src/py/reactpy/tests/test_backend/test_all.py b/src/py/reactpy/tests/test_backend/test_all.py index a86ee108c..9a1440d52 100644 --- a/src/py/reactpy/tests/test_backend/test_all.py +++ b/src/py/reactpy/tests/test_backend/test_all.py @@ -107,7 +107,10 @@ def ShowScope(): assert isinstance(scope.current, MutableMapping) -@pytest.mark.skipIf(sys.platform == "darwin", reason="Tornado and Flask backends are currently buggy on MacOS.") +@pytest.mark.skipIf( + sys.platform == "darwin", + reason="Tornado and Flask backends are currently buggy on MacOS.", +) async def test_use_location(display: DisplayFixture): location = reactpy.Ref() diff --git a/src/py/reactpy/tests/test_core/test_events.py b/src/py/reactpy/tests/test_core/test_events.py index 237c9d4ed..b6fea346a 100644 --- a/src/py/reactpy/tests/test_core/test_events.py +++ b/src/py/reactpy/tests/test_core/test_events.py @@ -193,7 +193,7 @@ def inner_click_no_op(event): clicked.current = True def outer_click_is_not_triggered(event): - raise AssertionError() + raise AssertionError outer = reactpy.html.div( {