-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
重写 import 辅助函数的方式 #525
base: master
Are you sure you want to change the base?
重写 import 辅助函数的方式 #525
Conversation
Thanks for your contribution! |
…seMatcher, use 'from utils import *' instead of 'import utils', remove prefix in each Matcher
@guozixu2001 按上面的评论回复开发吧,冲突了需要处理一下 |
_instance = None | ||
INIT_CONTENT = """ | ||
# This content is generated by PaConvert ToolKit, please Don't edit it! | ||
############################## 相关utils函数,如下 ############################## | ||
####################### PaConvert 自动生成的代码,请勿手动修改! ################## |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一行在is_dir_mode下需要,非is_dir_mode就不打印了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
意思是在转换单个文件的时候,完全不需要插入类似的标识了吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
意思是在转换单个文件的时候,完全不需要插入类似的标识了吗?
单文件不要这个 ####################### PaConvert 自动生成的代码,请勿手动修改! ##################
,多文件需要
@guozixu2001 处理下冲突,按上面意见改吧 |
PR Docs
单文件转换:如果只转换单个文件,就不单独生成 utils.py ,而是直接写到转换后的文件里直接使用,不需要再 import utils;
多文件转换:调用多次 PaConvert 也不会生成重复的代码
改动内容
AuxFileHelper
类:>>>>
和<<<<
,在多次调用 PaConvert 的时候,只重写其中的内容。这样避免了写入重复的代码PR APIs