Skip to content

Commit e680bc1

Browse files
committed
fixup!: naming
1 parent 7a8179d commit e680bc1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/cpplint.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@
7070
# Refs: https://github.com/python/cpython/issues/105456
7171
# Refs: https://github.com/python/cpython/issues/91308
7272
try:
73-
recompile = re._compiler.compile
73+
srecompile = re._compiler.compile
7474
except AttributeError:
7575
import sre_compile
76-
recompile = sre_compile.compile
76+
srecompile = sre_compile.compile
7777

7878
try:
7979
# -- pylint: disable=used-before-assignment
@@ -1086,7 +1086,7 @@ def Match(pattern, s):
10861086
# performance reasons; factoring it out into a separate function turns out
10871087
# to be noticeably expensive.
10881088
if pattern not in _regexp_compile_cache:
1089-
_regexp_compile_cache[pattern] = recompile(pattern)
1089+
_regexp_compile_cache[pattern] = srecompile(pattern)
10901090
return _regexp_compile_cache[pattern].match(s)
10911091

10921092

@@ -1104,14 +1104,14 @@ def ReplaceAll(pattern, rep, s):
11041104
string with replacements made (or original string if no replacements)
11051105
"""
11061106
if pattern not in _regexp_compile_cache:
1107-
_regexp_compile_cache[pattern] = recompile(pattern)
1107+
_regexp_compile_cache[pattern] = srecompile(pattern)
11081108
return _regexp_compile_cache[pattern].sub(rep, s)
11091109

11101110

11111111
def Search(pattern, s):
11121112
"""Searches the string for the pattern, caching the compiled regexp."""
11131113
if pattern not in _regexp_compile_cache:
1114-
_regexp_compile_cache[pattern] = recompile(pattern)
1114+
_regexp_compile_cache[pattern] = srecompile(pattern)
11151115
return _regexp_compile_cache[pattern].search(s)
11161116

11171117

0 commit comments

Comments
 (0)