drivendataorg / cookiecutter-data-science

A logical, reasonably standardized, but flexible project structure for doing and sharing data science work.
https://cookiecutter-data-science.drivendata.org/
MIT License
7.99k stars 2.41k forks source link

Ruff lint configuration names are incorrect #388

Open r-b-g-b opened 3 weeks ago

r-b-g-b commented 3 weeks ago

To reproduce:

  1. Create a new cookiecutter-data-science repo
  2. Run ruff lint .

Error:

Ruff: Lint failed (ruff failed
  Cause: Failed to parse /home/.../pyproject.toml
  Cause: TOML parse error at line 30, column 12
   |
30 | [tool.ruff.lint.isort]
   |            ^^^^
unknown field `known_first_party`, expected one of `force-wrap-aliases`, `force-single-line`, `single-line-exclusions`, `combine-as-imports`, `split-on-trailing-comma`, `order-by-type`, `force-sort-within-sections`, `case-sensitive`, `force-to-top`, `known-first-party`, `known-third-party`, `known-local-folder`, `extra-standard-library`, `relative-imports-order`, `required-imports`, `classes`, `constants`, `variables`, `no-lines-before`, `lines-after-imports`, `lines-between-types`, `forced-separate`, `section-order`, `default-section`, `no-sections`, `detect-same-package`, `from-first`, `length-sort`, `length-sort-straight`, `sections`
)

It appears that the pyproject.toml ruff configuration setting names are incorrect -- they should use hyphens rather than underscores as separators.

https://docs.astral.sh/ruff/configuration/

r-b-g-b commented 3 weeks ago

Possibly fixed by #387