PyCQA / PyCQA/flake8-pyi

Use `Never` for return types

Open
#551 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.