sot / kadi

Chandra commands and events
https://sot.github.io/kadi
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

Use ruff for linting and formatting #268

Closed taldcroft closed 10 months ago

taldcroft commented 1 year ago

Description

Now that ruff also supports black-style formatting we can use it exclusively for both linting and formatting. The ruff formatter is about 30 times faster than black so this is a good thing.

This PR is intended as the prototype for future ruff configurations. It applies a good set of rules without going crazy.

Interface impacts

No code impact, but this suggests updates to the standard files in skare3/templates.

Testing

Unit tests

Independent check of unit tests by [REVIEWER NAME]

Functional tests

Confirmed pre-commit and workflows are working with ruff format and lint issues introduced by rebase. It failed when expected. Also confirmed that the pyrightconfig.json file results in notebook files being ignored by pyright in VS code.

taldcroft commented 10 months ago

I am merging this to master to allow rebasing of the other four open kadi PR's on master. This still will have a full review and if any issues arise we will fix them in another PR.