Use `Never` for return types
Open
Nobody has claimed this yet.
type-feature
- Dominant language
- Python
- Stars
- 83
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Per the discussion in python/cpython#132941, Never is also preferred for return types. We should either extend Y050 to apply everywhere or introduce a new error code for non-argument types.
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
Start with the existing Y050 rule and read the linked python/cpython#132941 discussion about using Never for return types. Determine whether Y050 should cover return types or a separate error code is needed, then verify the chosen behavior against the plugin's rule checks. Done means the intended return-type cases are consistently reported without changing unrelated cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100