File: mypy.md

package info (click to toggle)
ormar 0.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,952 kB
  • sloc: python: 24,085; makefile: 34; sh: 14
file content (20 lines) | stat: -rw-r--r-- 505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
To provide better errors check you should use mypy with pydantic [plugin][plugin] 

Please use notation introduced in version 0.4.0.

```Python hl_lines="15-17"
--8<-- "../docs_src/models/docs012.py"
```

Note that above example is not using the type hints, so further operations with mypy might fail, depending on the context.

Preferred notation should look liked this:

```Python hl_lines="15-17"
--8<-- "../docs_src/models/docs001.py"
```




[plugin]: https://pydantic-docs.helpmanual.io/mypy_plugin/