Skip to content

Commit

Permalink
build(deps): use the ruff snap
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Jul 16, 2024
1 parent 36ff7c7 commit 949b37d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
echo "Installing snaps in the background while running apt and pip..."
sudo snap install --no-wait --classic pyright
sudo snap install --no-wait shellcheck
sudo snap install --no-wait ruff
echo "::endgroup::"
echo "::group::pip install"
python -m pip install 'tox>=4'
Expand Down
4 changes: 2 additions & 2 deletions HACKING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ you with tox, but you'll need to install:
``snap install --classic pyright``)
- ShellCheck_ (also available via snap: ``snap install shellcheck``)
- pre-commit_
- ruff_ (also available via snap: ``snap install ruff``)

Once you have all of those installed, you can install the necessary virtual
environments for this repository using tox.
Expand All @@ -35,7 +36,6 @@ Some other tools we use for code quality include:

- Black_ for code formatting
- pytest_ for testing
- ruff_ for linting (and some additional formatting)

A complete list is kept in our pyproject.toml_ file in dev dependencies.

Expand Down Expand Up @@ -130,7 +130,7 @@ Please follow these guidelines when committing code for this project:
.. _pyproject.toml: ./pyproject.toml
.. _Pyright: https://github.com/microsoft/pyright
.. _pytest: https://pytest.org
.. _ruff: https://github.com/charliermarsh/ruff
.. _ruff: https://github.com/astral-sh/ruff
.. _ShellCheck: https://www.shellcheck.net/
.. _`SSH access is limited`: https://github.com/marketplace/actions/debugging-with-tmate#use-registered-public-ssh-keys
.. _`SSH key on GitHub`: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ dev = [
lint = [
"black==24.4.2",
"codespell[toml]==2.2.6",
"ruff==0.4.10",
"yamllint==1.35.1",
]
types = [
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ base = testenv, lint
labels = lint
allowlist_externals =
shellcheck: bash, xargs
ruff: ruff
commands_pre =
shellcheck: bash -c '{[shellcheck]find} | {[shellcheck]filter} > {env_tmp_dir}/shellcheck_files'
commands =
Expand Down Expand Up @@ -120,6 +121,8 @@ commands =
description = Automatically format source code
base = testenv, lint
labels = format
allowlist_externals =
ruff: ruff
commands =
black: black {tty:--color} {posargs} .
ruff: ruff --fix --respect-gitignore {posargs} .
Expand Down

0 comments on commit 949b37d

Please sign in to comment.