- In the
pre-commit configuration file, upgrade Ruff to the latest version;
- Enable Ruff E, W, F, RUF, NPY, and DTZ rules, i.e.
# pyproject.toml
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
"E", # errors
"W", # warning
"F", # pyflakes
"RUF", # ruff
"NPY", # numpy
"DTZ", # datetime
]
- Fix all Ruff errors.