Skip to content

Commit

Permalink
[UpdateTestChecks][NFC] Drop a python2 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
arichardson committed Sep 28, 2021
1 parent 3c51b9e commit a281770
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions llvm/utils/UpdateTestChecks/common.py
Expand Up @@ -7,12 +7,6 @@
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


Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a281770

Please sign in to comment.