🐛 fix(vscode): 代码阅读把 Python 赋值后面的字符串当变量说明,其余单独的字符串显示成注释
This commit is contained in:
1 parent
a51f90e34d
commit
1f86201373
14 files changed
+358
-59
No files matched your search
@@ -0,0 +1,33 @@
|
||||
"""属性 docstring 的样例:前两条常量节选自 luffy-agent-platform 的 case_library/models.py。"""
|
||||
|
||||
CASE_DEPLOYMENT_UNIQUE_CONSTRAINT = "uq_case_library_deployment"
|
||||
"""一 deployment 一案例的唯一约束名; 入库侧按它认"重复入库", 故与建表同源。"""
|
||||
|
||||
_TIMEOUT = 30 # 秒
|
||||
|
||||
"""隔着空行、赋值行尾有注释也算。"""
|
||||
|
||||
|
||||
class CaseStatus:
|
||||
"""案例状态."""
|
||||
|
||||
ANALYZING = "analyzing"
|
||||
"""正在分析源 deployment."""
|
||||
|
||||
title: str = ""
|
||||
"""案例标题,
|
||||
用户可编辑.""" # 行尾
|
||||
|
||||
# 隔着注释就不算
|
||||
"""不是 title 的说明。"""
|
||||
|
||||
|
||||
def run(items):
|
||||
total = 0
|
||||
"""先把总数清零。
|
||||
|
||||
- 再逐个加
|
||||
"""
|
||||
f"{total} 不是注释"
|
||||
b"bytes"
|
||||
return total
|
||||
Reference in new issue
Block a user