Anyone out there have a solution or workaround for this?

github.com/python/mypy/issues/

Right now I’m doing:

# wrapper type is Callable[[Iterable[T]], Iterable[T]]k: KeyTypev: ValueTypefor k, v in wrapper(my_dict.items()): # type: ignore    ...

Which is fine for a temporary workaround, but it’d be better to have a proper workaround for the time being.

Formatting on that is weird, I don’t know why it gets rid of the linebreaks. Here it is with linebreaks:

# wrapper type is Callable[[Iterable[T]], Iterable[T]]
k: KeyType
v: ValueType
for k, v in wraper(my_dict.items()): # type: ignore
...

Show thread
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.