Files
pydantic/docs/build
Eric Jolibois 1c3ef841e6 feat: add validator for None, NoneType or Literal[None] (#2149)
* feat: add validator for NoneType

closes #2095

* feat: support NoneType directly as type

* chore: add change file

* chore: fix typo

* fix: handle Literal[None] for python3.6/3.7 without typing_extensions

* chore: move NotNoneError and export it

* chore: use constant NONE_TYPES to simplify a bit

* chore: use check on Literal instead of typing_extensions

These tests would not run on python 3.8+ without typing_extensions
even though Literal is defined

* test: use fresh Literal[None] in test case

* feat: handle `None` type in schema

* docs: add NoneType documentation

* refactor: switch NONE_TYPES from tuple to set
2021-01-01 14:01:25 +00:00
..