Skip to content

Y069: Flag NoReturn on import - #552

Open
srittau wants to merge 4 commits into
mainfrom
y050-noreturn
Open

Y069: Flag NoReturn on import#552
srittau wants to merge 4 commits into
mainfrom
y050-noreturn

Conversation

@srittau

@srittau srittau commented Jul 23, 2026

Copy link
Copy Markdown
Member

Closes: #551

@github-actions

This comment has been minimized.

@srittau

srittau commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

See python/typeshed#16079 for the companion PR.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@JelleZijlstra

Copy link
Copy Markdown
Collaborator

Given that the place where we now flag this lint is non-overlapping with where we flagged it before, it might be better to use a new code and retire the existing one. Otherwise people migrating might have a hard time updating their configs. (I'm thinking partly of Ruff which uses the same codes.)

@github-actions

Copy link
Copy Markdown

⚠ Flake8 diff showing the effect of this PR on typeshed:

> ./stdlib/typing_extensions.pyi:33:1: Y069 Use "typing_extensions.Never" instead of "typing.NoReturn"

@srittau srittau changed the title Y050: Flag NoReturn on import Y069: Flag NoReturn on import Jul 24, 2026
@srittau

srittau commented Jul 24, 2026

Copy link
Copy Markdown
Member Author

⚠ Flake8 diff showing the effect of this PR on typeshed:

> ./stdlib/typing_extensions.pyi:33:1: Y069 Use "typing_extensions.Never" instead of "typing.NoReturn"

This is the re-export of NoReturn in typing_extensions and expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Never for return types

2 participants