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

Docs: magic-value-comparison shows an example that is not flagged #8109

Closed
bersbersbers opened this issue Oct 21, 2023 · 2 comments · Fixed by #8111
Closed

Docs: magic-value-comparison shows an example that is not flagged #8109

bersbersbers opened this issue Oct 21, 2023 · 2 comments · Fixed by #8111
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@bersbersbers
Copy link
Contributor

The code example at https://docs.astral.sh/ruff/rules/magic-value-comparison/ shows an example that is not flagged.

Here's a demo and an example that is actually flagged:
https://play.ruff.rs/0cd75dbb-5452-4b44-ac7b-ef1cc92e6d6e

@charliermarsh
Copy link
Member

Thanks, will fix...

@bersbersbers
Copy link
Contributor Author

bersbersbers commented Oct 22, 2023

I haven't checked, but I wouldn't be surprised if the new code was flagged by https://docs.astral.sh/ruff/rules/superfluous-else-return/ now ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants