Files
pydantic/tests/mypy/outputs/plugin-fail-strict.txt
T
PrettyWood c83156d0e0 feat: make pydantic dataclass decorator support built-in dataclass (#1817)
* feat: pydantic dataclasses support built-in ones

closes #744

* feat: improve dataclass typing

* feat: add support for nested dataclasses

closes #1743

* feat: support dataclass schema with nested dataclasses

* refactor: remove `_dataclass_with_validation` function

* docs: add docstring for `make_dataclass_validator`

* refactor: rename DataclassType into Dataclass

The name `DataclassType` was missleading as it's not a `Type` per say.

* refactor: change global `dataclass` import to local

pydantic import time was improved in
https://github.com/samuelcolvin/pydantic/pull/1132
by keeping `dataclass` import local. So let's keep it that way!

* test: add extra nested case with BaseModel

* chore: s/pydantic/_pydantic_/g

* docs: add some documentation
2020-10-26 11:09:28 +00:00

38 lines
3.0 KiB
Plaintext

24: error: Unexpected keyword argument "z" for "Model" [call-arg]
25: error: Missing named argument "y" for "Model" [call-arg]
26: error: Property "y" defined in "Model" is read-only [misc]
27: error: "Model" does not have orm_mode=True [pydantic-orm]
36: error: Unexpected keyword argument "x" for "ForbidExtraModel" [call-arg]
47: error: Unexpected keyword argument "x" for "ForbidExtraModel2" [call-arg]
53: error: Invalid value for "Config.extra" [pydantic-config]
58: error: Invalid value for "Config.orm_mode" [pydantic-config]
63: error: Invalid value for "Config.orm_mode" [pydantic-config]
74: error: Incompatible types in assignment (expression has type "ellipsis", variable has type "int") [assignment]
77: error: Untyped fields disallowed [pydantic-field]
84: error: Untyped fields disallowed [pydantic-field]
87: error: Missing named argument "a" for "DefaultTestingModel" [call-arg]
87: error: Missing named argument "b" for "DefaultTestingModel" [call-arg]
87: error: Missing named argument "c" for "DefaultTestingModel" [call-arg]
87: error: Missing named argument "d" for "DefaultTestingModel" [call-arg]
87: error: Missing named argument "e" for "DefaultTestingModel" [call-arg]
91: error: Name 'Undefined' is not defined [name-defined]
94: error: Missing named argument "undefined" for "UndefinedAnnotationModel" [call-arg]
101: error: Missing named argument "y" for "construct" of "Model" [call-arg]
103: error: Argument "x" to "construct" of "Model" has incompatible type "str"; expected "int" [arg-type]
108: error: Argument "x" to "InheritingModel" has incompatible type "str"; expected "int" [arg-type]
109: error: Argument "x" to "Settings" has incompatible type "str"; expected "int" [arg-type]
110: error: Argument "x" to "Model" has incompatible type "str"; expected "int" [arg-type]
127: error: Argument "data" to "Response" has incompatible type "int"; expected "Model" [arg-type]
135: error: Argument "y" to "AliasModel" has incompatible type "int"; expected "str" [arg-type]
141: error: Required dynamic aliases disallowed [pydantic-alias]
145: error: Argument "z" to "DynamicAliasModel" has incompatible type "str"; expected "int" [arg-type]
156: error: Unexpected keyword argument "y" for "DynamicAliasModel2" [call-arg]
163: error: Required dynamic aliases disallowed [pydantic-alias]
181: error: Untyped fields disallowed [pydantic-field]
185: error: Unexpected keyword argument "x" for "AliasGeneratorModel2" [call-arg]
186: error: Unexpected keyword argument "z" for "AliasGeneratorModel2" [call-arg]
189: error: Name 'Missing' is not defined [name-defined]
197: error: No overload variant of "dataclass" matches argument type "Dict[<nothing>, <nothing>]" [call-overload]
197: note: Possible overload variant:
197: note: def dataclass(*, init: bool = ..., repr: bool = ..., eq: bool = ..., order: bool = ..., unsafe_hash: bool = ..., frozen: bool = ..., config: Optional[Type[Any]] = ...) -> Callable[[Type[Any]], Type[Dataclass]]
197: note: <1 more non-matching overload not shown>