From 94eb7c67c8cc15e8b2d3ed03e3fa028962876b8e Mon Sep 17 00:00:00 2001 From: v-jizhang <66389669+buck-bot@users.noreply.github.com> Date: Tue, 22 Sep 2020 10:59:10 -0700 Subject: [PATCH] A fix for one line comment when removing runnable code. --- .jenkins/remove_runnable_code.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.jenkins/remove_runnable_code.py b/.jenkins/remove_runnable_code.py index 6a61cb656bc..bd62f0c5156 100644 --- a/.jenkins/remove_runnable_code.py +++ b/.jenkins/remove_runnable_code.py @@ -16,9 +16,17 @@ if line.startswith('#'): ret_lines.append(line) state = STATE_NORMAL + elif ((line.startswith('"""') or line.startswith('r"""')) and + line.endswith('"""')): + ret_lines.append(line) + state = STATE_NORMAL elif line.startswith('"""') or line.startswith('r"""'): ret_lines.append(line) state = STATE_IN_MULTILINE_COMMENT_BLOCK_DOUBLE_QUOTE + elif ((line.startswith("'''") or line.startswith("r'''")) and + line.endswith("'''")): + ret_lines.append(line) + state = STATE_NORMAL elif line.startswith("'''") or line.startswith("r'''"): ret_lines.append(line) state = STATE_IN_MULTILINE_COMMENT_BLOCK_SINGLE_QUOTE