NLeSC / python-template

Netherlands eScience Center Python Template
https://research-software-directory.org/software/nlesc-python-template
Apache License 2.0
163 stars 73 forks source link

Update ruff configuration #384

Open sjvrijn opened 2 months ago

sjvrijn commented 2 months ago

Description

Updated pre-commit script to use new explicit ruff check . syntax and ruff section in pyproject.toml to put most settings under tool.ruff.lint as instructed by deprecation warnings

[!NOTE] Note: based on #374, so marked as draft until that one is merged

Related issues

Instructions to review the pull request

$ cookiecutter -c 378-ruff-config-update https://github.com/NLeSC/python-template
# Fill with python-template-test info... or just press 'enter' 12 times
$ cd python-template-test
$ git init
$ git config --local core.hooksPath .githooks  # enable pre-commit git hook
$ git add .
$ git commit -m "initial commit"
Script .githooks/pre-commit triggered ...
Starting ruff analysis...
All checks passed!
Pre-commit checks completed successfully.
...
<regular commit summary output>
DaniBodor commented 3 days ago

So, I stupidly also started updating these before checking if anyone else had. I made a few additional changes to what you did. I decided to rebase it onto this and create a PR pointing here.

Not sure whether it's better to merge that PR into here (if you agree with changes) and then merge everything into main at once, or whether we first finish this PR and then open a new one with the rest of the changes. What do you think @sjvrijn and @bouweandela?