From 70e607a3f58f5822c6e49dc0704037b14cb39c36 Mon Sep 17 00:00:00 2001 From: Amer Elsheikh Date: Tue, 29 Sep 2026 02:14:04 -0700 Subject: [PATCH] Suppress new Pyrefly findings before upgrading to v1.3.0 This silences type checking errors that will start appearing with the upcoming release of Pyrefly PiperOrigin-RevId: 990158249 --- grain/_src/core/profiler_test.py | 2 +- grain/_src/python/data_loader.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grain/_src/core/profiler_test.py b/grain/_src/core/profiler_test.py index 254143d29..b926f42b7 100644 --- a/grain/_src/core/profiler_test.py +++ b/grain/_src/core/profiler_test.py @@ -15,7 +15,7 @@ def _worker_main(worker_init_fn: bytes): """Helper function to start a profiler server in a subprocess.""" worker_init_fn = cloudpickle.loads(worker_init_fn) - worker_init_fn() + worker_init_fn() # pyrefly: ignore[not-callable] time.sleep(10) diff --git a/grain/_src/python/data_loader.py b/grain/_src/python/data_loader.py index 4bb0f4901..25f584731 100644 --- a/grain/_src/python/data_loader.py +++ b/grain/_src/python/data_loader.py @@ -572,8 +572,8 @@ def set_state(self, state: bytes): """ state = json.loads(state.decode()) if self._validate_state: - self._data_loader._validate_state(state) # pylint: disable=protected-access - self._iterator.set_state(state) + self._data_loader._validate_state(state) # pylint: disable=protected-access # pyrefly: ignore[bad-argument-type] + self._iterator.set_state(state) # pyrefly: ignore[bad-argument-type] def start_prefetch(self): """Starts processing elements asynchronously in the background.