Skip to content

Commit 9cf644a

Browse files
committed
fix type hint annoyance
1 parent 9f879a6 commit 9cf644a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ line_length = 88
1212
lines_after_imports = 2
1313

1414
[tool.mypy]
15+
incremental = false
1516
ignore_missing_imports = true
1617
warn_unused_configs = true
1718
warn_redundant_casts = true

src/idom/core/types.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Type,
1616
TypeVar,
1717
Union,
18+
overload,
1819
)
1920

2021
from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, runtime_checkable
@@ -199,6 +200,23 @@ class EventHandlerType(Protocol):
199200
class VdomDictConstructor(Protocol):
200201
"""Standard function for constructing a :class:`VdomDict`"""
201202

203+
@overload
204+
def __call__(
205+
self,
206+
*children: VdomChild | VdomChildren,
207+
key: Key | None = None,
208+
**attributes: Any,
209+
) -> VdomDict:
210+
...
211+
212+
@overload
213+
def __call__(
214+
self,
215+
*children: VdomChild | VdomChildren,
216+
**attributes: Any,
217+
) -> VdomDict:
218+
...
219+
202220
def __call__(
203221
self,
204222
*children: VdomChild | VdomChildren,

0 commit comments

Comments
 (0)