python-code-review by existential-birds/beagle
npx skills add https://github.com/existential-birds/beagle --skill python-code-review| 问题类型 | 参考文档 |
|---|---|
| 缩进、行长度、空白符、命名 | references/pep8-style.md |
| 缺少/错误的类型提示、Any 的使用 | references/type-safety.md |
| 异步函数中的阻塞调用、缺少 await | references/async-patterns.md |
| 裸 except、缺少上下文、日志记录 | references/error-handling.md |
| 可变默认参数、print 语句 | references/common-mistakes.md |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
snake_case,类使用 CamelCase,常量使用 UPPER_CASEAny(使用时需附注释说明原因)T | None 语法(Python 3.10+)time.sleep, requests)awaitexcept: 子句raise ... from 来保留堆栈跟踪logger 而非 print() 进行输出.format() 或 %以下模式是故意为之且正确的——请勿将其报告为问题:
Any - 当外部库缺少类型存根时是必需的__init__.py 文件 - 对于包结构是有效的,不需要代码noqa 注释 - 当 linter 规则不适用于特定情况时是有效的cast() - 通知类型检查器类型已缩小的正确模式仅在满足特定条件时才标记这些问题:
| 问题 | 仅在以下情况标记 |
|---|---|
| 通用异常处理 | 存在具体且有意义的异常类型可用 |
| 未使用的变量 | 变量没有 _ 前缀 并且 未在 f-strings、日志记录或调试中使用 |
async def 函数时 → async-patterns.md在报告任何问题之前,请加载并遵循 review-verification-protocol。
每周安装量
247
代码仓库
GitHub 星标数
41
首次出现
2026年1月20日
安全审计
安装于
gemini-cli208
opencode208
codex203
github-copilot198
cursor185
amp157
| Issue Type | Reference |
|---|---|
| Indentation, line length, whitespace, naming | references/pep8-style.md |
| Missing/wrong type hints, Any usage | references/type-safety.md |
| Blocking calls in async, missing await | references/async-patterns.md |
| Bare except, missing context, logging | references/error-handling.md |
| Mutable defaults, print statements | references/common-mistakes.md |
snake_case for functions/variables, CamelCase for classes, UPPER_CASE for constantsAny unless necessary (with comment explaining why)T | None syntax (Python 3.10+)time.sleep, requests) in async functionsawait on all coroutinesexcept: clausesraise ... from to preserve stack traceslogger not print() for output.format() or %These patterns are intentional and correct - do not report as issues:
Any when interacting with untyped libraries - Required when external libraries lack type stubs__init__.py files - Valid for package structure, no code requirednoqa comments - Valid when linter rule doesn't apply to specific casecast() after runtime type check - Correct pattern to inform type checker of narrowed typeOnly flag these issues when the specific conditions apply:
| Issue | Flag ONLY IF |
|---|---|
| Generic exception handling | Specific exception types are available and meaningful |
| Unused variables | Variable lacks _ prefix AND isn't used in f-strings, logging, or debugging |
async def functions → async-patterns.mdLoad and follow review-verification-protocol before reporting any issue.
Weekly Installs
247
Repository
GitHub Stars
41
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli208
opencode208
codex203
github-copilot198
cursor185
amp157
PPTX 文件处理全攻略:Python 脚本创建、编辑、分析 .pptx 文件内容与结构
805 周安装