mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-02 17:43:25 +08:00
Use ruff, not pycln, for removing unused imports (#10498)
This commit is contained in:
@@ -29,7 +29,7 @@ it takes a bit longer. For more details, read below.
|
||||
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 `pycln`, `black`, `isort` and `ruff`) to fix any formatting issues.
|
||||
changes to your PR (using `black`, `isort` and `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 +84,8 @@ terminal to install all non-pytype requirements:
|
||||
|
||||
## Code formatting
|
||||
|
||||
The code is formatted using `black` and `isort`. Unused imports are also
|
||||
auto-removed using `pycln`, and various other autofixes are performed by `ruff`.
|
||||
The code is formatted using `black` and `isort`. Various other autofixes are
|
||||
also performed by `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,10 +93,9 @@ 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 `pycln`, `isort`, `black` and `ruff` manually...
|
||||
you're free to do so. Either run `isort`, `black` and `ruff` manually...
|
||||
|
||||
```bash
|
||||
$ pycln --config=pyproject.toml .
|
||||
$ isort .
|
||||
$ ruff .
|
||||
$ black .
|
||||
|
||||
Reference in New Issue
Block a user