Doc: Use proper name capitalization of tooling (Ruff, Black, Flake8) (#10913)

This commit is contained in:
Avasam
2023-10-18 18:46:53 -04:00
committed by GitHub
parent 608eca5234
commit 35873ec3d8
11 changed files with 52 additions and 44 deletions

View File

@@ -27,9 +27,12 @@ it takes a bit longer. For more details, read below.
### Code away!
Typeshed runs continuous integration (CI) on all pull requests. This means that
if you file a pull request (PR), our full test suite -- including our linter,
`flake8` -- is run on your PR. It also means that bots will automatically apply
changes to your PR (using `black`, `isort` and `ruff`) to fix any formatting issues.
if you file a pull request (PR), our full test suite
-- including our linter, [Flake8](https://github.com/PyCQA/flake8) --
is run on your PR. It also means that bots will automatically apply
changes to your PR (using [Black](https://github.com/psf/black),
[isort](https://github.com/PyCQA/isort) and
[Ruff](https://github.com/astral-sh/ruff)) to fix any formatting issues.
This frees you up to ignore all local setup on your side, focus on the
code and rely on the CI to fix everything, or point you to the places that
need fixing.
@@ -84,8 +87,10 @@ terminal to install all non-pytype requirements:
## Code formatting
The code is formatted using `black` and `isort`. Various other autofixes are
also performed by `ruff`.
The code is formatted using [`Black`](https://github.com/psf/black)
and [`isort`](https://github.com/PyCQA/isort).
Various other autofixes are
also performed by [`Ruff`](https://github.com/astral-sh/ruff).
The repository is equipped with a [`pre-commit.ci`](https://pre-commit.ci/)
configuration file. This means that you don't *need* to do anything yourself to
@@ -93,7 +98,7 @@ run the code formatters. When you push a commit, a bot will run those for you
right away and add a commit to your PR.
That being said, if you *want* to run the checks locally when you commit,
you're free to do so. Either run `isort`, `black` and `ruff` manually...
you're free to do so. Either run the following manually...
```bash
(.venv)$ isort .
@@ -104,9 +109,12 @@ you're free to do so. Either run `isort`, `black` and `ruff` manually...
...Or install the pre-commit hooks: please refer to the
[pre-commit](https://pre-commit.com/) documentation.
Our code is also linted using `flake8`, with plugins `flake8-pyi`,
`flake8-bugbear`, and `flake8-noqa`. As with our other checks, running
flake8 before filing a PR is not required. However, if you wish to run flake8
Our code is also linted using [`Flake8`](https://github.com/pycqa/flake8),
with plugins [`flake8-pyi`](https://github.com/pycqa/flake8-pyi),
[`flake8-bugbear`](https://github.com/PyCQA/flake8-bugbear),
and [`flake8-noqa`](https://github.com/plinss/flake8-noqa).
As with our other checks, running
Flake8 before filing a PR is not required. However, if you wish to run Flake8
locally, install the test dependencies as outlined above, and then run:
```bash