You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`*_dependencies` are usually packages needed to `pip install` the implementation
257
240
distribution.
@@ -260,7 +243,7 @@ The format of all `METADATA.toml` files can be checked by running
260
243
`python3 ./tests/check_typeshed_structure.py`.
261
244
262
245
263
-
## Preparing Changes
246
+
## Making Changes
264
247
265
248
### Before you begin
266
249
@@ -275,6 +258,27 @@ Each Python module is represented by a .pyi "stub file". This is a syntactically
275
258
276
259
Typeshed follows the standard type system guidelines for [stub content](https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#stub-content) and [coding style](https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#style-guide).
277
260
261
+
The code is formatted using [`Black`](https://github.com/psf/black).
262
+
Various other autofixes and lint rules are
263
+
also performed by [`Ruff`](https://github.com/astral-sh/ruff) and
264
+
[`Flake8`](https://github.com/pycqa/flake8),
265
+
with plugin [`flake8-pyi`](https://github.com/pycqa/flake8-pyi).
266
+
267
+
The repository is equipped with a [pre-commit.ci](https://pre-commit.ci/)
268
+
configuration file. This means that you don't *need* to do anything yourself to
269
+
run the code formatters or linters. When you push a commit, a bot will run
270
+
those for you right away and add any autofixes to your PR. Anything
271
+
that can't be autofixed will show up as a CI failure, hopefully with an error
272
+
message that will make it clear what's gone wrong.
273
+
274
+
That being said, if you *want* to run the formatters and linters locally
275
+
when you commit, you're free to do so. To use the same configuration as we use
276
+
in CI, we recommend doing this via pre-commit:
277
+
278
+
```bash
279
+
(.venv)$ pre-commit run --all-files
280
+
```
281
+
278
282
### What to include
279
283
280
284
Stubs should include the complete interface (classes, functions,
0 commit comments