Skip to content

[flake8-simplify] Make example error out-of-the-box (SIM110) #19113

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

MeGaGiGaGon
Copy link
Contributor

Summary

Part of #18972

This PR makes reimplemented-builtin (SIM110)'s example error out-of-the-box

Old example

for item in iterable:
    if predicate(item):
        return True
return False

New example

def foo():
    for item in iterable:
        if predicate(item):
            return True
    return False

The "Use instead" section was also updated to reflect the change.

Test Plan

N/A, no functionality/tests affected

Copy link
Contributor

github-actions bot commented Jul 3, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Thanks!

@ntBre ntBre added the documentation Improvements or additions to documentation label Jul 3, 2025
@ntBre ntBre merged commit bf88fee into astral-sh:main Jul 3, 2025
36 checks passed
@MeGaGiGaGon MeGaGiGaGon deleted the patch-9 branch July 3, 2025 14:17
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 this pull request may close these issues.

2 participants