-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Open
Description
When stepping through the code in filters.py
, I stumbled upon two instance where a function uses a dictionary as a default value.
While I think this is currently not a big problem and a low prio issue, any mutation to the variable could lead to undefined behaviour. Ruff has a great document concerning this.
How to reproduce:
uv run ruff check .venv/lib/python3.12/site-packages/rest_framework/* | grep B006
Here the lines where I found the problem:
def get_default_valid_fields(self, queryset, view, context={}): def get_valid_fields(self, queryset, view, context={}):
Metadata
Metadata
Assignees
Labels
No labels