From 19667696ffa873a47776a7e41e17e1986465c401 Mon Sep 17 00:00:00 2001 From: Daniel Toyama Date: Tue, 30 Jun 2026 13:29:23 -0700 Subject: [PATCH] Remove pyrefly escape hatch in adb_call_parser_test.py. PiperOrigin-RevId: 940628596 --- android_env/components/adb_call_parser_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android_env/components/adb_call_parser_test.py b/android_env/components/adb_call_parser_test.py index 33b41dd8..c3f4cfb8 100644 --- a/android_env/components/adb_call_parser_test.py +++ b/android_env/components/adb_call_parser_test.py @@ -25,6 +25,7 @@ from android_env.components import adb_call_parser from android_env.components import adb_controller from android_env.proto import adb_pb2 +from google.protobuf import text_format class AdbCallParserTest(parameterized.TestCase): @@ -229,8 +230,9 @@ def test_grant_permissions_successful(self): def test_press_button_invalid_button(self): adb = mock.create_autospec(adb_controller.AdbController) parser = adb_call_parser.AdbCallParser(adb) - request = adb_pb2.AdbRequest() - request.press_button.button = 99999 # pyrefly: ignore[bad-assignment] + request = text_format.Parse( + 'press_button { button: 99999 }', adb_pb2.AdbRequest() + ) response = parser.parse(request) self.assertEqual(response.status, adb_pb2.AdbResponse.Status.FAILED_PRECONDITION)