From 1c9e72e28d41bb532dabc2f414b45ec9bb06348a Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Sat, 29 Nov 2025 16:45:45 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=96=B0=E5=A2=9Ereplace=5Fcomments.p?= =?UTF-8?q?y=20=E8=84=9A=E6=9C=AC=EF=BC=8C=E4=BD=BF=E7=94=A8python=20repla?= =?UTF-8?q?ce=5Fcomments.py=20--path=20./src=E6=9D=A5=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E7=89=88=E6=9D=83=E6=B3=A8=E9=87=8A=E5=8F=8A=E7=A9=BA=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- replace_comments.py | 170 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 replace_comments.py diff --git a/replace_comments.py b/replace_comments.py new file mode 100644 index 000000000..53da7acdf --- /dev/null +++ b/replace_comments.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import os +import argparse + +# 定义要查找和替换的注释内容 +# 使用原始字符串数组,支持多个旧内容,避免Unicode转义问题 +OLD_COMMENTS = [ + r""" + 0 else "未找到匹配的文件") + +if __name__ == "__main__": + main() \ No newline at end of file