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
extend-immutable-calls: how to configure? #212
Comments
Same problem here - I tried to silence |
You want:
|
Do we feel we should add anything more to the README here? I'd accept a PR if so. Otherwise do we close? |
Ah, great thanks. And the matching happens by name, right? So in the following case I would need
|
And as we are here already: Would it make sense to add a hint to this parameter to the error message of B008? |
Great, thank you for clarifying! I had thought that the values should be defined as a (Python) array. Now, when typing something like this (for more than one fastAPI thing to allow), everything works as expected:
|
Please at least add to the README to make it clearer. The message, I’d you can make a sane suggestion in code please do too. Thanks! |
You can use list format like this: extend-immutable-calls =
fastapi.Header,
fastapi.Depends, |
If anyone is using [tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
# Whitelisted default arguments
"fastapi.Header",
"fastapi.Depends",
] |
I haven't been able to make the recently released feature
extend-immutable-calls
to work.Have I configured it wrong?
I have verified that
flake8
recognizes the config, by setting the line-length to 10 and verified flake8 warnings about line length.example.py
setup.cfg
The text was updated successfully, but these errors were encountered: