Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4aa8b4b

Browse files
authored
Format shell commands in README consistently (#5100)
Any command that includes the "(.venv3) $" prompt is hard to read when it's set inline. So put them all into triple-backtick blocks.
1 parent 82cd7d2 commit 4aa8b4b

1 file changed

Lines changed: 34 additions & 9 deletions

File tree

README.md

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ If you want to run the pyright tests, you need to have
137137
### mypy_test.py
138138

139139
This test requires Python 3.6 or higher; Python 3.6.1 or higher is recommended.
140-
Run using:`(.venv3)$ python3 tests/mypy_test.py`
140+
Run using:
141+
```
142+
(.venv3)$ python3 tests/mypy_test.py
143+
```
141144

142145
This test is shallow — it verifies that all stubs can be
143146
imported but doesn't check whether stubs match their implementation
@@ -161,7 +164,10 @@ running mypy --python-version 3.9 --strict-optional # with 342 files
161164
This test requires Python 2.7 and Python 3.6. Pytype will
162165
find these automatically if they're in `PATH`, but otherwise you must point to
163166
them with the `--python27-exe` and `--python36-exe` arguments, respectively.
164-
Run using: `(.venv3)$ python3 tests/pytype_test.py`
167+
Run using:
168+
```
169+
(.venv3)$ python3 tests/pytype_test.py
170+
```
165171

166172
This test works similarly to `mypy_test.py`, except it uses `pytype`.
167173

@@ -172,27 +178,39 @@ This test requires Node.js to be installed.
172178
### mypy_self_check.py
173179

174180
This test requires Python 3.6 or higher; Python 3.6.1 or higher is recommended.
175-
Run using: `(.venv3)$ python3 tests/mypy_self_check.py`
181+
Run using:
182+
```
183+
(.venv3)$ python3 tests/mypy_self_check.py
184+
```
176185

177186
This test checks mypy's code base using mypy and typeshed code in this repo.
178187

179188
### mypy_test_suite.py
180189

181190
This test requires Python 3.5 or higher; Python 3.6.1 or higher is recommended.
182-
Run using: `(.venv3)$ python3 tests/mypy_test_suite.py`
191+
Run using:
192+
```
193+
(.venv3)$ python3 tests/mypy_test_suite.py
194+
```
183195

184196
This test runs mypy's own test suite using the typeshed code in your repo. This
185197
will sometimes catch issues with incorrectly typed stubs, but is much slower
186198
than the other tests.
187199

188200
### check_consistent.py
189201

190-
Run using: `python3 tests/check_consistent.py`
202+
Run using:
203+
```
204+
python3 tests/check_consistent.py
205+
```
191206

192207
### stubtest_test.py
193208

194209
This test requires Python 3.6 or higher.
195-
Run using `(.venv3)$ python3 tests/stubtest_test.py`
210+
Run using
211+
```
212+
(.venv3)$ python3 tests/stubtest_test.py
213+
```
196214

197215
This test compares the stdlib stubs against the objects at runtime. Because of
198216
this, the output depends on which version of Python and on what kind of system
@@ -209,13 +227,20 @@ can add to the whitelists for each affected Python version in
209227
at [mypy](https://github.com/python/mypy/issues).
210228

211229
To run stubtest against third party stubs, it's easiest to use stubtest
212-
directly, with `(.venv3)$ python3 -m mypy.stubtest --custom-typeshed-dir
213-
<path-to-typeshed> <third-party-module>`.
230+
directly, with
231+
```
232+
(.venv3)$ python3 -m mypy.stubtest \
233+
--custom-typeshed-dir <path-to-typeshed> \
234+
<third-party-module>
235+
```
214236
stubtest can also help you find things missing from the stubs.
215237

216238

217239
### flake8
218240

219-
flake8 requires Python 3.6 or higher. Run using: `(.venv3)$ flake8`
241+
flake8 requires Python 3.6 or higher. Run using:
242+
```
243+
(.venv3)$ flake8
244+
```
220245

221246
Note typeshed uses the `flake8-pyi` and `flake8-bugbear` plugins.

0 commit comments

Comments
 (0)