-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
The new rule PERF402 suggests to convert lists to trivial copies in cases where it's not really possible. Ideally the tool would not report such false positives.
If you're filing a bug report, please consider including the following information:
- A minimal code snippet that reproduces the bug.
# In this example you can't trivially convert this to a `list.copy` as the rule suggests.
for r in record_dict["values"]:
list_of_stuff[r["other_value"]].append(r)-
The command you invoked (e.g.,
ruff /path/to/file.py --fix), ideally including the--isolatedflag.ruff --select=PERF402 example.py -
The current Ruff settings (any relevant sections from your
pyproject.toml).PERFruleset is enabled -
The current Ruff version (
ruff --version).version =
0.0.276
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working