| 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 |
Complete in order. Do not advance until each pass condition is met.
.py path (or explicit glob) you inspected this run.[FILE:LINE] (or a bounded line range). Symbols or short verbatim snippets may supplement the location anchor but do not replace it.async def functions → async-patterns.mdBefore reporting: complete Gates (reporting workflow) above (especially gate 4).
共 2 个版本