From a28177035b16e8884107be686a805f82e8f35840 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 24 Sep 2021 14:15:22 +0100 Subject: [PATCH] [UpdateTestChecks][NFC] Drop a python2 workaround --- llvm/utils/UpdateTestChecks/common.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py index 3bc908923bcf..5cb5eb473e28 100644 --- a/llvm/utils/UpdateTestChecks/common.py +++ b/llvm/utils/UpdateTestChecks/common.py @@ -7,12 +7,6 @@ import re import subprocess import sys -if sys.version_info[0] > 2: - class string: - expandtabs = str.expandtabs -else: - import string - ##### Common utilities for update_*test_checks.py @@ -266,7 +260,7 @@ def scrub_body(body): # whitespace in place. body = SCRUB_WHITESPACE_RE.sub(r' ', body) # Expand the tabs used for indentation. - body = string.expandtabs(body, 2) + body = str.expandtabs(body, 2) # Strip trailing whitespace. body = SCRUB_TRAILING_WHITESPACE_TEST_RE.sub(r'', body) return body