-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
changeSuggested alteration to Pydantic, not a new feature nor a bugSuggested alteration to Pydantic, not a new feature nor a bugv3Under consideration for V3Under consideration for V3
Description
Initial Checks
- I confirm that I'm using Pydantic V2
Description
in the example below, the output should be True in my opinion because A is first in the mro.
Example Code
from pydantic import BaseModel, ConfigDict
class A(BaseModel):
model_config = ConfigDict(strict=True)
class B(BaseModel):
model_config = ConfigDict(strict=False)
class C(A, B):
pass
print(C.model_config["strict"]) # FalsePython, Pydantic & OS Version
pydantic version: 2.8.2
pydantic-core version: 2.20.1
pydantic-core build: profile=release pgo=true
install path: C:\Users\AMONGUS\projects\test\.venv\Lib\site-packages\pydantic
python version: 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)]
platform: Windows-10-10.0.19045-SP0
related packages: typing_extensions-4.12.2
commit: unknown
DetachHead, andresliszt, s4n-cz, smcoll and ipeluffo
Metadata
Metadata
Assignees
Labels
changeSuggested alteration to Pydantic, not a new feature nor a bugSuggested alteration to Pydantic, not a new feature nor a bugv3Under consideration for V3Under consideration for V3