From 137dcd18cc20b49059d834a592fe7e200bc4aeee Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 25 Jan 2023 12:34:50 -0800 Subject: [PATCH] Remove pylint disable comments that no longer trigger warnings PiperOrigin-RevId: 504633130 Change-Id: I3fdbc83975fea97aa53f7325d323adead0a30e24 --- googlemock/test/gmock_test_utils.py | 5 ----- googletest/test/googletest-catch-exceptions-test.py | 1 - googletest/test/gtest_test_utils.py | 9 +++------ 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/googlemock/test/gmock_test_utils.py b/googlemock/test/gmock_test_utils.py index d7bc0974..edad1f75 100755 --- a/googlemock/test/gmock_test_utils.py +++ b/googlemock/test/gmock_test_utils.py @@ -77,9 +77,6 @@ def GetExitStatus(exit_code): return -1 -# Suppresses the "Invalid const name" lint complaint -# pylint: disable-msg=C6409 - # Exposes utilities from gtest_test_utils. Subprocess = gtest_test_utils.Subprocess TestCase = gtest_test_utils.TestCase @@ -87,8 +84,6 @@ environ = gtest_test_utils.environ SetEnvVar = gtest_test_utils.SetEnvVar PREMATURE_EXIT_FILE_ENV_VAR = gtest_test_utils.PREMATURE_EXIT_FILE_ENV_VAR -# pylint: enable-msg=C6409 - def Main(): """Runs the unit test.""" diff --git a/googletest/test/googletest-catch-exceptions-test.py b/googletest/test/googletest-catch-exceptions-test.py index a850ea4a..127584ff 100755 --- a/googletest/test/googletest-catch-exceptions-test.py +++ b/googletest/test/googletest-catch-exceptions-test.py @@ -81,7 +81,6 @@ EX_BINARY_OUTPUT = gtest_test_utils.Subprocess( # The tests. if SUPPORTS_SEH_EXCEPTIONS: - # pylint:disable-msg=C6302 class CatchSehExceptionsTest(gtest_test_utils.TestCase): """Tests exception-catching behavior.""" diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py index 459f9ea3..6fc39b57 100755 --- a/googletest/test/gtest_test_utils.py +++ b/googletest/test/gtest_test_utils.py @@ -63,9 +63,8 @@ def SetEnvVar(env_var, value): # Here we expose a class from a particular module, depending on the -# environment. The comment suppresses the 'Invalid variable name' lint -# complaint. -TestCase = _test_module.TestCase # pylint: disable=C6409 +# environment. +TestCase = _test_module.TestCase # Initially maps a flag to its default value. After # _ParseAndStripGTestFlags() is called, maps a flag to its actual value. @@ -77,9 +76,7 @@ _gtest_flags_are_parsed = False def _ParseAndStripGTestFlags(argv): """Parses and strips Google Test flags from argv. This is idempotent.""" - # Suppresses the lint complaint about a global variable since we need it - # here to maintain module-wide state. - global _gtest_flags_are_parsed # pylint: disable=W0603 + global _gtest_flags_are_parsed if _gtest_flags_are_parsed: return