mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
c24d33e5f1
* Generate docs exampels for Python 3.10 and above Code quality is not great and main intent here is to show the result. * Fix docs build on 3.9 * Build docs on 3.10 * What's Python 3.1? * Create temp dir if not exists * Refactor and improve imlementetion * Keep runtime typing in examples * Revert unrelated formatting changes * Add changes file * Allow specifying requirements in examples * Pin autoflake and pyupgrade * Add docs/build to Makefile lint/format/mypy * ignore_missing_imports for ansi2html and devtools * Add .tmp-projections to .gitignore * Remove dont-upgrade now when Pattern is supported * Update postponed evaluation examples Co-authored-by: Samuel Colvin <s@muelcolvin.com>
12 lines
248 B
Python
12 lines
248 B
Python
# output-json
|
|
from index_main import User
|
|
|
|
# ignore-above
|
|
from pydantic import ValidationError
|
|
|
|
try:
|
|
User(signup_ts='broken', friends=[1, 2, 'not number'])
|
|
except ValidationError as e:
|
|
print(e.json())
|
|
# requires: User from previous example
|