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

B008 fails for function calls within expressions #229

Closed
adamchainz opened this issue Mar 14, 2022 · 2 comments · Fixed by #239
Closed

B008 fails for function calls within expressions #229

adamchainz opened this issue Mar 14, 2022 · 2 comments · Fixed by #239

Comments

@adamchainz
Copy link

B008 does not detect cases where function calls are used in sub-expressions, like:

import datetime as dt

def f(when=dt.datetime.now() + dt.timedelta(days=7)):
    pass
@jpy-git
Copy link
Contributor

jpy-git commented Mar 22, 2022

Makes sense, I've got a fix for this so will tidy it up and make the PR later today 👍

@adamchainz
Copy link
Author

Brilliant, thanks!

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