fix(python): PLR0915 counts statements, not lines
Verified with `ruff rule PLR0915`: it is `too-many-statements` (default 50), not a line-length rule. Ruff has no line-based function-length rule at all. python.md now says so and points both limits at a pytest case; coding-dev.md gains the general distinction between a real length lint and a proxy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
32b47b075b
commit
3171595940
2 files changed
+9
-5
No files matched your search
@@ -132,9 +132,11 @@ When talking to a rate-limited API (a chat platform, a store, a tracker):
|
||||
installable package** with its own repo and version, consumed as a dependency.
|
||||
- Keep persistent state in the framework's own config/storage system so it survives restarts;
|
||||
do not invent a parallel JSON file beside it.
|
||||
- File and function size limits from the general rules apply — Ruff's `PLR0915` covers
|
||||
function length; put the file limit in a pytest case (see
|
||||
[`coding-dev.md` §4](skills-public/coding-dev.md)).
|
||||
- File and function size limits from the general rules apply. Ruff has **no line-based**
|
||||
function-length rule — `PLR0915` (`too-many-statements`, default 50) and `C901`
|
||||
(cyclomatic complexity) are the closest proxies and are worth enabling, but neither
|
||||
measures lines. Put **both** the function-length and file-length limits in a pytest
|
||||
case (see [`coding-dev.md` §4](skills-public/coding-dev.md)).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user