|
1 | 1 | # Contributing |
2 | 2 |
|
3 | | -This is a quick reference for Click-specific development tasks. For setting up the development environment and the general contribution workflow, see the Pallets [quick reference](https://palletsprojects.com/contributing/quick/) and the [detailed contributing guide](https://palletsprojects.com/contributing/). |
| 3 | +This is a quick reference for Click-specific development |
| 4 | +tasks. For setting up the development environment and the |
| 5 | +general contribution workflow, see the Pallets [quick |
| 6 | +reference](https://palletsprojects.com/contributing/quick/) |
| 7 | +and the [detailed contributing |
| 8 | +guide](https://palletsprojects.com/contributing/). |
4 | 9 |
|
5 | 10 | ## Extra Test Environments |
6 | 11 |
|
7 | 12 | Click includes some extra test environments: |
8 | 13 |
|
9 | | -- `tox r -e stress` runs stress tests for race conditions in Click's test runner. |
| 14 | +- `tox r -e stress` runs stress tests for race conditions |
| 15 | + in Click's test runner. |
10 | 16 |
|
11 | 17 | ```shell-session |
12 | 18 | $ tox r -e stress |
13 | 19 | ``` |
14 | 20 |
|
15 | | -- `tox r -e random` runs tests in parallel in a random order to detect test pollution. |
| 21 | +- `tox r -e random` runs tests in parallel in a random |
| 22 | + order to detect test pollution. |
16 | 23 |
|
17 | 24 | ```shell-session |
18 | 25 | $ tox r -e random |
19 | 26 | ``` |
20 | 27 |
|
21 | | -- A CI workflow (`.github/workflows/test-flask.yaml`) runs Flask's test suite to catch downstream regressions. |
| 28 | +- A CI workflow (`.github/workflows/test-flask.yaml`) |
| 29 | + runs Flask's test suite to catch downstream |
| 30 | + regressions. |
| 31 | +
|
| 32 | +## Code Style |
| 33 | +
|
| 34 | +Avoid ternary expressions (`x if cond else y`): coverage |
| 35 | +cannot measure both branches. Use an explicit `if`/`else` |
| 36 | +block instead. |
| 37 | +
|
| 38 | +Do not add unnecessary dependencies. If a feature can be |
| 39 | +implemented with the standard library, do not pull in an |
| 40 | +external package for it. |
| 41 | +
|
| 42 | +## Formatting |
| 43 | +
|
| 44 | +Wrap lines in Markdown files at 80 characters. |
0 commit comments