mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
16 lines
291 B
Python
16 lines
291 B
Python
import inspect
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class MyModel(BaseModel):
|
|
id: int
|
|
info: str = 'Foo'
|
|
|
|
def __init__(self, id: int = 1, *, bar: str, **data) -> None:
|
|
"""My custom init!"""
|
|
super().__init__(id=id, bar=bar, **data)
|
|
|
|
|
|
print(inspect.signature(MyModel))
|