Add ruff exclusions to pyproject.toml (#2537)

This makes it easier to run 'ruff check' outside of the pre-commit
hook.

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2 files changed