Contributing¶
Contributions and suggestions for new features are welcome, as are bug reports! Please open an issue to discuss new features or to report bugs.
Local setup¶
Requirements:
uvhttps://docs.astral.sh/uv/getting-started/installation/
uv python pin 3.14
uv venv .venv
source .venv/bin/activate
uv sync --all-groups
prek install
Prek¶
We use prek to manage our git hooks.
It is installed as part of uv sync --all-groups, and it is configured in
prek.toml.
prek install sets up the git hook, so the checks run automatically whenever you commit.
To run every hook against the whole repo without committing, use:
prek run -a
Note
We used to use pre-commit with a .pre-commit-config.yaml file.
If you set up your local checkout before that change, re-run prek install to replace the
old hook — otherwise the stale pre-commit hook will no longer find a config it recognises.
prek.toml contains the following hooks:
- actionlint: lints our GitHub Actions workflow files.
- pyproject-fmt: formats and normalizes
pyproject.toml. - Ruff: does linting checks (including import sorting) and automatically fixes what it can.
- Ruff format: automatically formats your code to a standardized Python format.
- mypy: static type checker which verifies you are not using objects incorrectly.
- codespell: catches common spelling mistakes in the docs.
As mentioned, some of these tools automatically fix your code while other only highlight potential issues. Sometimes it will be enough to try to commit a second time and it will pass, while other times it may require manual changes to your code.
In rare cases it may be difficult or undesirable to change to code to pass the linting rules.
If this happens, it's ok to add a Ruff # noqa or mypy # type: ignore comment to skip that line.
For details of how to do this, please see the Ruff docs
and mypy docs.
Use of AI¶
We welcome contributions that use AI assistance. The maintainers of this code use AI coding assistance to varying degrees. Additionally, we have accepted and will continue to accept contributions from outside contributors which are AI written.
All we ask is:
- Please disclose the use of AI coding in your pull request.
- Please communicate with us using your own words, not through an AI.
- Permission to use AI in contributions is not the same as permission to spam us with slop PRs.
Please also consider the following: The maintainers of this code base have access to the same LLMs that you do. We have just as much of an ability as you do to copy+paste a simple issue description into an AI coding agent and get a pull request out of it. If you are scraping Github repos to find open issues and slinging slop at hundreds or thousands of projects you have no connection to, we are not interested.
Credits¶
This package was written by Phil Ewels (@ewels), based on initial code by Will McGugan (@willmcgugan).
rich-click is co-maintained by Daniel Reeves (@dwreeves).
Furthermore, these contributors helped make the package what it is today:
See the full list of contributors here.