Skip to content

Commit e4ce495

Browse files
committed
Add notes
1 parent b95e22e commit e4ce495

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

tests/typing/configuration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@
7979
pydantic_settings=[PydanticSettings()],
8080
)
8181
config5_pydantic.set_pydantic_settings([PydanticSettings()])
82+
83+
# NOTE: Using assignment since PydanticSettings is context-sensitive: conditional on whether pydantic is installed
8284
config5_pydantic_settings: list[PydanticSettings] = (config5_pydantic.get_pydantic_settings())
8385

8486
# Test 6: to check init arguments

tests/typing/declarative_container.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Container1(containers.DeclarativeContainer):
99
provider = providers.Factory(int)
1010

1111

12+
# NOTE: Using assignment to check base class instead of exact type
1213
container1 = Container1()
1314
container1_type: containers.Container = Container1()
1415
provider1: providers.Provider[int] = container1.provider

tests/typing/dynamic_container.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@
2727
assert_type(dependencies, Dict[str, providers.Provider[Any]])
2828

2929
# Test 6: to check base class
30+
# NOTE: Using assignment to check base class instead of exact type
3031
container6: containers.Container = containers.DynamicContainer()

0 commit comments

Comments
 (0)