Skip to content
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

Python文件头部注释:单引号如何修改为双引号呢? #595

Open
zhjr2019 opened this issue Dec 11, 2023 · 3 comments
Open

Python文件头部注释:单引号如何修改为双引号呢? #595

zhjr2019 opened this issue Dec 11, 2023 · 3 comments

Comments

@zhjr2019
Copy link

想要支持新的语言:

语言:Python

目前插件生成的模板:

'''
Author: zh2021 ***@qq.com
Date: 2023-10-30 17:04:23
LastEditors: zh2021 ***@qq.com
LastEditTime: 2023-12-11 10:45:06
FilePath: \ALGO\Image2Excel.py
Description: 

Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
'''

提供你最终想要的注释模板:

“”“
Author: zh2021 ***@qq.com
Date: 2023-10-30 17:04:23
LastEditors: zh2021 ***@qq.com
LastEditTime: 2023-12-11 10:45:06
FilePath: \ALGO\Image2Excel.py
Description: 

Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
”“”

其他相关
在这里添加关于特性请求的任何其他上下文或屏幕截图。
2023-12-11_10-56-42

@OvoLiuLiu
Copy link

哥们你有办法解决了吗?我用black formatter格式化后,会把单引号变成双引号,koro1FileHeader插件不能识别,就会生成一个重复的头部注释。

@shunjiu
Copy link

shunjiu commented Mar 11, 2024

setting,在fileheader.configObj下language字典中添加:

"py":{
"head":"\"\"\"",
"middle":"",
"end":"\"\"\""
}

@OvoLiuLiu
Copy link

@shunjiu 成功了,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants