From e207f27a35eafe3fb4ad2cb64db316f583d79a38 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Wed, 5 Jun 2024 08:03:17 -0700 Subject: [PATCH] Internal Change PiperOrigin-RevId: 640527247 --- python/google/protobuf/internal/text_format_test.py | 1 - python/google/protobuf/text_format.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/python/google/protobuf/internal/text_format_test.py b/python/google/protobuf/internal/text_format_test.py index a527e5bd67..fe1781be1e 100644 --- a/python/google/protobuf/internal/text_format_test.py +++ b/python/google/protobuf/internal/text_format_test.py @@ -2408,7 +2408,6 @@ class TokenizerTest(unittest.TestCase): with self.assertRaises(text_format.ParseError): text_format.Parse('NotGroupLikeScope { b:1 }', msg) - # Tests for pretty printer functionality. @_parameterized.parameters((unittest_pb2), (unittest_proto3_arena_pb2)) class PrettyPrinterTest(TextFormatBase): diff --git a/python/google/protobuf/text_format.py b/python/google/protobuf/text_format.py index 2244ccca3c..b12204ed25 100644 --- a/python/google/protobuf/text_format.py +++ b/python/google/protobuf/text_format.py @@ -1809,7 +1809,7 @@ def ParseFloat(text): try: return float(text.rstrip('f')) except ValueError: - raise ValueError('Couldn\'t parse float: %s' % text) + raise ValueError("Couldn't parse float: %s" % text) def ParseBool(text):