Check for protocol methods returning None
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 83
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
This is actually not a stub-specific rule, but protocol methods returning None instead of object are suspect. None is meant as "The caller should not use the return value", but it actually means that any implementation must return None. (I remember we had this problem at least once. It might have been related to an ignored seek() return value.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by tracing how flake8-pyi checks protocol methods, then define which methods returning None should be flagged and add coverage for the ignored-return-value case described in the issue. Done means the rule detects the intended declarations without flagging valid cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100