[UpdateTestChecks][NFC] Drop a python2 workaround

This commit is contained in:
Alex Richardson 2021-09-24 14:15:22 +01:00
parent 3c51b9e270
commit a28177035b
1 changed files with 1 additions and 7 deletions

View File

@ -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