Download lexicon/zh.json from tailot/lingologos-thinkingpython: direct link, hf CLI and curl.
- Browser
- Download file 6.02 kB
-
https://huggingface.co/datasets/tailot/lingologos-thinkingpython/resolve/main/lexicon/zh.json
- Command line
-
hf download hf://datasets/tailot/lingologos-thinkingpython/lexicon/zh.json
-
curl -L -o zh.json https://huggingface.co/datasets/tailot/lingologos-thinkingpython/resolve/main/lexicon/zh.json
6.02 kB
| { | |
| "lang": "zh", | |
| "name": "Chinese", | |
| "noise": [ | |
| ",", | |
| ".", | |
| "!", | |
| "?", | |
| ";", | |
| ":", | |
| "\"", | |
| "'", | |
| "(", | |
| ")", | |
| ",", | |
| "。", | |
| "?" | |
| ], | |
| "units": { | |
| "file": [ | |
| "文件", | |
| "模块" | |
| ], | |
| "function": [ | |
| "函数", | |
| "方法" | |
| ], | |
| "test": [ | |
| "测试", | |
| "用例" | |
| ] | |
| }, | |
| "domains": [ | |
| "代码", | |
| "测试", | |
| "文档" | |
| ], | |
| "frames": { | |
| "mutable-default": [ | |
| "可变默认值", | |
| "默认列表", | |
| "共享默认值", | |
| "默认参数", | |
| "默认值是列表", | |
| "默认值共享", | |
| "默认值被共用", | |
| "列表被共用" | |
| ], | |
| "magic-literal": [ | |
| "魔法数字", | |
| "无名常量", | |
| "硬编码数字", | |
| "给这个数字命名", | |
| "裸数字", | |
| "同一个数字", | |
| "没有名字的常量", | |
| "数字写了三遍" | |
| ], | |
| "guard-clause": [ | |
| "守卫子句", | |
| "提前返回", | |
| "嵌套 if", | |
| "拉平条件", | |
| "if 嵌套太深", | |
| "嵌套太深", | |
| "一个 if 包住全部", | |
| "拉平嵌套", | |
| "if 里面还有 if", | |
| "条件包住了整个函数体", | |
| "嵌套太多读不动" | |
| ], | |
| "dead-import": [ | |
| "未使用的导入", | |
| "无用导入", | |
| "导入没用到", | |
| "没用的导入", | |
| "多余的导入", | |
| "导入了但没用到", | |
| "静态检查指出导入" | |
| ], | |
| "loop-comprehension": [ | |
| "列表推导式", | |
| "重写循环", | |
| "循环改推导式", | |
| "用推导式", | |
| "改成推导式", | |
| "循环换成推导式", | |
| "循环在构造列表", | |
| "循环只是在追加" | |
| ], | |
| "concat-fstring": [ | |
| "f 字符串", | |
| "字符串拼接", | |
| "格式化字符串", | |
| "用加号拼字符串", | |
| "字符串格式化" | |
| ], | |
| "add-assertion": [ | |
| "断言类型", | |
| "加一个守卫", | |
| "检查参数", | |
| "类型检查", | |
| "加断言", | |
| "参数类型断言", | |
| "使用前先检查类型" | |
| ], | |
| "unused-local": [ | |
| "没用到的局部变量", | |
| "算出来没人读的值", | |
| "没用的赋值", | |
| "死变量", | |
| "这个变量没被使用", | |
| "没人读的次数" | |
| ], | |
| "unreachable-code": [ | |
| "无法到达的代码", | |
| "return 之后的代码", | |
| "这行从不执行", | |
| "raise 之后的死代码", | |
| "进不去的块", | |
| "这个分支不会执行" | |
| ], | |
| "empty-except": [ | |
| "空的 except", | |
| "except 什么都不做", | |
| "异常被吞掉", | |
| "except 里只有 pass", | |
| "静默失败", | |
| "try 的处理块是空的" | |
| ], | |
| "bare-except": [ | |
| "裸的 except", | |
| "没有类型的 except", | |
| "什么异常都抓", | |
| "泛泛的 except", | |
| "except 没写异常类型", | |
| "什么都捕获" | |
| ], | |
| "bool-prefix": [ | |
| "if 返回 True 或 False", | |
| "多余的布尔", | |
| "直接返回 bool", | |
| "if 和 else 给出 True 和 False", | |
| "不必要的布尔前缀", | |
| "多余的 bool 转换" | |
| ], | |
| "len-zero": [ | |
| "len 等于零", | |
| "len(x) == 0", | |
| "用长度判断而不是判空", | |
| "把 len 和零比较", | |
| "用 len 做判空", | |
| "长度等于零" | |
| ], | |
| "bool-compare": [ | |
| "与 True 比较", | |
| "x == True", | |
| "跟 True 比对", | |
| "显式的布尔比较", | |
| "等于 True", | |
| "直接和布尔值比较" | |
| ], | |
| "dict-get": [ | |
| "为默认值捕 KeyError", | |
| "用 try except 处理缺失的键", | |
| "字典 get 带默认值", | |
| "字典的默认值", | |
| "捕获 KeyError 来给默认值", | |
| "映射里缺了这个键" | |
| ], | |
| "redundant-list": [ | |
| "给推导式包一层 list", | |
| "推导式的 list", | |
| "多余的 list 调用", | |
| "多余的 list 包装", | |
| "把推导式包进 list", | |
| "推导式外面多此一举的 list" | |
| ], | |
| "str-of-string": [ | |
| "对字符串用 str", | |
| "在字符串上调用 str", | |
| "多余的 str 转换", | |
| "本来就是字符串", | |
| "重复的字符串转换", | |
| "str 用了两次" | |
| ], | |
| "open-context": [ | |
| "没有 with 的 open", | |
| "不用上下文管理器打开文件", | |
| "文件句柄没关闭", | |
| "手动 open 和 close", | |
| "文件缺少 with 块", | |
| "文件打开后没关闭" | |
| ], | |
| "range-len": [ | |
| "for 里用带 len 的 range", | |
| "对 len 的 range 循环", | |
| "range(len(...))", | |
| "按下标的循环", | |
| "缺少 enumerate", | |
| "用 len 算下标" | |
| ], | |
| "dataclass-init": [ | |
| "init 只给参数赋值的类", | |
| "样板构造函数", | |
| "缺少 dataclass", | |
| "手动给字段赋值", | |
| "构造函数把参数拷进字段", | |
| "普通类里重复的 __init__" | |
| ] | |
| }, | |
| "labels": { | |
| "state": "状态", | |
| "level": "层级", | |
| "domain": "领域", | |
| "not_understood": "没有理解这个请求。", | |
| "out_of_domain": "这个请求不在本系统的目录内。", | |
| "refused": "已拒绝", | |
| "clarify": "你指的是哪个符号?", | |
| "verified": "已验证", | |
| "unknown": "未知", | |
| "single_prover": "单一证明者", | |
| "progress": "处理中" | |
| }, | |
| "examples": [ | |
| { | |
| "text": "去掉 load_config 里的可变默认值", | |
| "frame": "mutable-default" | |
| }, | |
| { | |
| "text": "这个数字出现三次,给它命名", | |
| "frame": "magic-literal" | |
| }, | |
| { | |
| "text": "把这个嵌套 if 改成提前返回", | |
| "frame": "guard-clause" | |
| }, | |
| { | |
| "text": "json 的导入已经没用了", | |
| "frame": "dead-import" | |
| }, | |
| { | |
| "text": "把这个 for 循环改成列表推导式", | |
| "frame": "loop-comprehension" | |
| }, | |
| { | |
| "text": "用 f 字符串构造这条消息", | |
| "frame": "concat-fstring" | |
| }, | |
| { | |
| "text": "使用前断言 count 是 int", | |
| "frame": "add-assertion" | |
| }, | |
| { | |
| "text": "用 enumerate 改写 indexed 里的 range len", | |
| "frame": "range-len" | |
| } | |
| ] | |
| } | |