diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py --- a/clang-tools-extra/clang-tidy/add_new_check.py +++ b/clang-tools-extra/clang-tidy/add_new_check.py @@ -172,7 +172,7 @@ lines = iter(lines) try: while True: - line = lines.next() + line = next(lines) if not header_added: match = re.search('#include "(.*)"', line) if match: @@ -197,7 +197,7 @@ # If we didn't find the check name on this line, look on the # next one. prev_line = line - line = lines.next() + line = next(lines) match = re.search(' *"([^"]*)"', line) if match: current_check_name = match.group(1)