Skip to content

Fix UP008 callable scope handling to support lambdas#24274

Merged
charliermarsh merged 1 commit intomainfrom
charlie/up
Mar 29, 2026
Merged

Fix UP008 callable scope handling to support lambdas#24274
charliermarsh merged 1 commit intomainfrom
charlie/up

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

Summary

E.g., we can flag and rewrite this:

class LambdaMethod(BaseClass):
    f = lambda self: super(LambdaMethod, self).f()

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Mar 28, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 28, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh marked this pull request as ready for review March 29, 2026 01:13
@astral-sh-bot astral-sh-bot bot requested a review from ntBre March 29, 2026 01:13
@charliermarsh charliermarsh merged commit 716260b into main Mar 29, 2026
42 checks passed
@charliermarsh charliermarsh deleted the charlie/up branch March 29, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants