File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1666,8 +1666,12 @@ else:
1666
1666
@overload
1667
1667
def sum (__iterable : Iterable [_AddableT1 ], __start : _AddableT2 ) -> _AddableT1 | _AddableT2 : ...
1668
1668
1669
- # The argument to `vars()` has to have a `__dict__` attribute, so can't be annotated with `object`
1669
+ # The argument to `vars()` has to have a `__dict__` attribute, so the second overload can't be annotated with `object`
1670
1670
# (A "SupportsDunderDict" protocol doesn't work)
1671
+ # Use a type: ignore to make complaints about overlapping overloads go away
1672
+ @overload
1673
+ def vars (__object : type ) -> types .MappingProxyType [str , Any ]: ... # type: ignore[misc]
1674
+ @overload
1671
1675
def vars (__object : Any = ...) -> dict [str , Any ]: ...
1672
1676
1673
1677
class zip (Iterator [_T_co ], Generic [_T_co ]):
You can’t perform that action at this time.
0 commit comments