Skip to content

Commit 86af184

Browse files
committed
docs(developing): Update for flake8 and mypy
1 parent 797ac54 commit 86af184

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

docs/developing.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ $ make serve
163163

164164
## Linting
165165

166-
[flake8] run via CI in our GitHub Actions. See the configuration in `pyproject.toml` and
166+
[flake8] and [mypy] run via CI in our GitHub Actions. See the configuration in `pyproject.toml` and
167167
`setup.cfg`.
168168

169169
### flake8
@@ -217,6 +217,55 @@ See `[flake8]` in setup.cfg.
217217
218218
````
219219

220+
### mypy
221+
222+
[mypy] is used for static type checking.
223+
224+
````{tab} Command
225+
226+
poetry:
227+
228+
```console
229+
$ poetry run mypy .
230+
```
231+
232+
If you setup manually:
233+
234+
```console
235+
$ mypy .
236+
```
237+
238+
````
239+
240+
````{tab} make
241+
242+
```console
243+
$ make mypy
244+
```
245+
246+
````
247+
248+
````{tab} Watch
249+
250+
```console
251+
$ make watch_mypy
252+
```
253+
254+
requires [`entr(1)`].
255+
````
256+
257+
````{tab} Configuration
258+
259+
See `[flake8]` in setup.cfg.
260+
261+
```{literalinclude} ../setup.cfg
262+
:language: ini
263+
:start-at: "[mypy]"
264+
265+
```
266+
267+
````
268+
220269
## Publishing to PyPI
221270

222271
As of 0.10, [poetry] handles virtualenv creation, package requirements, versioning,
@@ -237,3 +286,4 @@ Update `__version__` in `__about__.py` and `pyproject.toml`::
237286
[black]: https://github.com/psf/black
238287
[isort]: https://pypi.org/project/isort/
239288
[flake8]: https://flake8.pycqa.org/
289+
[mypy]: http://mypy-lang.org/

0 commit comments

Comments
 (0)