mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
Add linting for docs/examples (#1530)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from pydantic import BaseModel, ValidationError, validator
|
||||
|
||||
|
||||
class Model(BaseModel):
|
||||
foo: str
|
||||
|
||||
@@ -10,8 +11,8 @@ class Model(BaseModel):
|
||||
|
||||
return v
|
||||
|
||||
|
||||
try:
|
||||
Model(foo='ber')
|
||||
except ValidationError as e:
|
||||
print(e.errors())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user