[pylint] Implement invalid-length-returned (E0303) (#10963)

Add pylint rule invalid-length-returned (PLE0303)

See https://github.com/astral-sh/ruff/issues/970 for rules

Test Plan: `cargo test`

TBD: from the description: "Strictly speaking `bool` is a subclass of
`int`, thus returning `True`/`False` is valid. To be consistent with
other rules (e.g.
[PLE0305](https://github.com/astral-sh/ruff/pull/10962)
invalid-index-returned), ruff will raise, compared to pylint which will
not raise."
This commit is contained in:
Tibor Reiss
2024-04-18 03:54:52 +02:00
committed by GitHub
parent b23414e3cc
commit 9f01ac3f87
8 changed files with 242 additions and 0 deletions

1
ruff.schema.json generated
View File

@@ -3267,6 +3267,7 @@
"PLE03",
"PLE030",
"PLE0302",
"PLE0303",
"PLE0304",
"PLE0307",
"PLE0308",