Skip to content

Commit 3e72466

Browse files
Thomas Rabaixrande
authored andcommitted
fix(qa): fix deprecated warnings
1 parent 4715876 commit 3e72466

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ clean:
2424
test: build-install
2525
uv run flake8 ioc/ tests/
2626
uv run python -m unittest discover -s tests -p "test_*.py"
27+
uv run python -W error::DeprecationWarning -W error::PendingDeprecationWarning -W error::FutureWarning -m unittest discover -s tests -p "test_*.py"
2728
LC_ALL=C.UTF-8 LANG=C.UTF-8 uv run sphinx-build -nW -b html -d docs/_build/doctrees docs docs/_build/html
2829

2930
test-strict: build-install
@@ -40,3 +41,4 @@ typecheck: build-install
4041

4142
unittest: build-install
4243
uv run python -m unittest discover -s tests -p "test_*.py" -v
44+

ioc/component.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _resolve(self, parameter: Any, parameter_holder: ParameterHolder) -> Any:
112112
if HAS_PYDANTIC and isinstance(parameter, PydanticBaseModel):
113113
# If the parameter is a Pydantic model, resolve its fields
114114
def walk_and_modify(model):
115-
for field in model.model_fields:
115+
for field in type(model).model_fields:
116116
value = getattr(model, field)
117117
if isinstance(value, PydanticBaseModel):
118118
parameter = walk_and_modify(value) # Recursive call for nested models

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ioc"
7-
version = "0.1.17"
7+
version = "0.1.18"
88
description = "A small dependency injection container based on Symfony2 Dependency Component"
99
readme = "README.md"
1010
license = "Apache-2.0"

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)