Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do not use mutable data structures for argument defaults #9741

Open
@reinhash

Description

@reinhash

When stepping through the code infilters.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 greatdocument 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp