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

function calls inside lambda is warned as B008 #242

Closed
toslunar opened this issue Mar 25, 2022 · 1 comment · Fixed by #243
Closed

function calls inside lambda is warned as B008 #242

toslunar opened this issue Mar 25, 2022 · 1 comment · Fixed by #243

Comments

@toslunar
Copy link

Since flake8-bugbear 22.3.23, B008 warns the code below , but the function calls inside lambda is not called at function definition time. It seems #239 caused this regression.

def foo(f=lambda x: print(x)):
    f(1)


foo()
@jpy-git
Copy link
Contributor

jpy-git commented Mar 25, 2022

Ah yep functions in a lambda aren't executed a definition time so will fix this 👍

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 a pull request may close this issue.

2 participants