Skip to content

Commit aea0415

Browse files
Viicosstaticxterm
authored andcommitted
Do not ignore deprecation warnings in tests
1 parent 415c319 commit aea0415

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

beanie/odm/utils/pydantic.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ def get_field_type(field):
3030

3131
def get_model_fields(model):
3232
if IS_PYDANTIC_V2:
33-
return model.model_fields
33+
if isinstance(model, type):
34+
return model.model_fields
35+
return model.__class__.model_fields
3436
else:
3537
return model.__fields__
3638

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ testpaths = [
9999
]
100100
filterwarnings = [
101101
"error",
102-
"ignore::DeprecationWarning",
103102
"ignore::UserWarning",
104103
]
105104
asyncio_mode = "auto"

0 commit comments

Comments
 (0)