Commit cd0f504
committed
Fix pydantic/semver example
The current example, when used with semver 3.0.0.dev4 and pydantic
1.10.4, produces the following error:
pydantic.errors.ConfigError: Invalid signature for validator <bound
method Version.parse of <class '__main__.PydanticVersion'>>: (version:
Union[str, bytes], optional_minor_and_patch: bool = False) ->
'Version', should be: (value, values, config, field), "values",
"config" and "field" are all optional.
This commit fixes the example in the documentation so that it works and
does not raise an error.1 parent 0ca281d commit cd0f504
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
| |||
0 commit comments