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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+23-25Lines changed: 23 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ are important to the project's success.
9
9
10
10
1.[Prepare your environment](#preparing-the-environment).
11
11
2. Find out [where to make your changes](#where-to-make-changes).
12
-
3.[Prepare your changes](#preparing-changes):
12
+
3.[Making your changes](#making-changes):
13
13
* Small fixes and additions can be submitted directly as pull requests,
14
14
but [contact us](README.md#discussion) before starting significant work.
15
15
* Create your stubs, considering [what to include](#what-to-include) and
@@ -112,29 +112,6 @@ as it's currently excluded from the requirements file:
112
112
</tr>
113
113
</table>
114
114
115
-
## Code formatting
116
-
117
-
The code is formatted using [`Black`](https://github.com/psf/black).
118
-
Various other autofixes and lint rules are
119
-
also performed by [`Ruff`](https://github.com/astral-sh/ruff) and
120
-
[`Flake8`](https://github.com/pycqa/flake8),
121
-
with plugin [`flake8-pyi`](https://github.com/pycqa/flake8-pyi).
122
-
123
-
The repository is equipped with a [pre-commit.ci](https://pre-commit.ci/)
124
-
configuration file. This means that you don't *need* to do anything yourself to
125
-
run the code formatters or linters. When you push a commit, a bot will run
126
-
those for you right away and add any autofixes to your PR. Anything
127
-
that can't be autofixed will show up as a CI failure, hopefully with an error
128
-
message that will make it clear what's gone wrong.
129
-
130
-
That being said, if you *want* to run the formatters and linters locally
131
-
when you commit, you're free to do so. To use the same configuration as we use
132
-
in CI, we recommend doing this via pre-commit:
133
-
134
-
```bash
135
-
(.venv)$ pre-commit run --all-files
136
-
```
137
-
138
115
## Where to make changes
139
116
140
117
### Standard library stubs
@@ -260,7 +237,7 @@ The format of all `METADATA.toml` files can be checked by running
260
237
`python3 ./tests/check_typeshed_structure.py`.
261
238
262
239
263
-
## Preparing Changes
240
+
## Making Changes
264
241
265
242
### Before you begin
266
243
@@ -275,6 +252,27 @@ Each Python module is represented by a .pyi "stub file". This is a syntactically
275
252
276
253
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
254
255
+
The code is formatted using [`Black`](https://github.com/psf/black).
256
+
Various other autofixes and lint rules are
257
+
also performed by [`Ruff`](https://github.com/astral-sh/ruff) and
258
+
[`Flake8`](https://github.com/pycqa/flake8),
259
+
with plugin [`flake8-pyi`](https://github.com/pycqa/flake8-pyi).
260
+
261
+
The repository is equipped with a [pre-commit.ci](https://pre-commit.ci/)
262
+
configuration file. This means that you don't *need* to do anything yourself to
263
+
run the code formatters or linters. When you push a commit, a bot will run
264
+
those for you right away and add any autofixes to your PR. Anything
265
+
that can't be autofixed will show up as a CI failure, hopefully with an error
266
+
message that will make it clear what's gone wrong.
267
+
268
+
That being said, if you *want* to run the formatters and linters locally
269
+
when you commit, you're free to do so. To use the same configuration as we use
270
+
in CI, we recommend doing this via pre-commit:
271
+
272
+
```bash
273
+
(.venv)$ pre-commit run --all-files
274
+
```
275
+
278
276
### What to include
279
277
280
278
Stubs should include the complete interface (classes, functions,
0 commit comments