Description
Running the ruff format on plt.bar(dict_a.keys(), dict_a.values()) is formatted by ruff to dict_a.items() which seems to be an issue.
This is the pre-commit config I am using
- repo:
https://github.com/astral-sh/ruff-pre-commit
rev: 21d9bff1d62aaf03230baa6b804b9074255fa9b8 # v0.4.1
hooks:
- id: ruff
args:
- --output-format
- full
- --fix
types_or: [python, pyi, jupyter]
- id: ruff-format
types_or: [python, pyi, jupyter]
Example
from matplotlib.pyplot import plt
dict_a = {"A":1, "B":2, "C":3}
plt.bar(dict_a.keys(), dict_a.values())
Resolves this to:
dict_a = {"A": 1, "B": 2, "C": 3}
dict_a.items()