Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flake8-return] Take NoReturn annotation into account when analyzing implicit returns #9636

Conversation

mikeleppane
Copy link
Contributor

Summary

When we are analyzing the implicit return rule this change add an additional check to verify if the call expression has been annotated with NoReturn type from typing module.

See: #5474

Test Plan

cargo test

Copy link
Contributor

github-actions bot commented Jan 24, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx!

@charliermarsh charliermarsh added the bug Something isn't working label Jan 24, 2024
@charliermarsh charliermarsh changed the title fix(RET503): take NoReturn function annotation into account when analyzing implicit returns [flake8-return] Take NoReturn annotation into account when analyzing implicit returns Jan 24, 2024
@charliermarsh charliermarsh enabled auto-merge (squash) January 24, 2024 17:15
@charliermarsh charliermarsh merged commit 45628a5 into astral-sh:main Jan 24, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants