Skip to content

Commit 731af81

Browse files
committed
Remove TODOs to adjust for fixed stubs
1 parent 35ecd2c commit 731af81

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

tests/typing/aggregate.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ class Cat(Animal): ...
2727
assert_type(provider_set_non_string_1, providers.Provider[str])
2828

2929

30-
# TODO: Change providers.Aggregate to accept Mapping? Then remove explicit typing here
31-
provider1_new_non_string_keys = providers.Aggregate[str](
30+
provider1_new_non_string_keys = providers.Aggregate(
3231
{Cat: providers.Object("str")},
3332
)
3433
factory_new_non_string_1 = provider1_new_non_string_keys.providers[Cat]

tests/typing/callable.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,14 @@ def create(cls) -> Animal:
3333
args4 = provider4.args
3434
kwargs4 = provider4.kwargs
3535
assert_type(args4, Tuple[Any])
36-
# TODO: Change Callable.kwargs to Dict[str, Any]? Then adjust test back to Dict[str, Any]
37-
assert_type(kwargs4, Dict[Any, Any])
36+
assert_type(kwargs4, Dict[str, Any])
3837

3938
# Test 5: to check the provided instance interface
4039
provider5 = providers.Callable(Animal)
4140
provided_val5 = provider5.provided()
4241
attr_getter5 = provider5.provided.attr
4342
item_getter5 = provider5.provided["item"]
4443
method_caller5 = provider5.provided.method.call(123, arg=324)
45-
# TODO: Remove explicit typing of Provider.provided return type
4644
assert_type(provided_val5, Any)
4745
assert_type(attr_getter5, providers.AttributeGetter)
4846
assert_type(item_getter5, providers.ItemGetter)
@@ -84,6 +82,5 @@ async def _async9() -> None:
8482

8583

8684
# Test 12: to check string imports
87-
# TODO: Use T_Any as Callable typevar? Then remove type-ignore
88-
provider12 = providers.Callable("builtins.dict") # type: ignore[var-annotated]
85+
provider12 = providers.Callable("builtins.dict")
8986
provider12.set_provides("builtins.dict")

0 commit comments

Comments
 (0)