Skip to content

Conversation

@twoertwein
Copy link
Member

contextmanager should expect a Generator, not an Iterator. Iterator[...] and Generator[..., None, None] are not the same, see python/typeshed#2772

This might help @asottile a bit with python/typeshed#7430. Basically, staled because it would impact too many projects - after this PR there is one fewer :)

@twoertwein twoertwein added the Typing type annotations, mypy/pyright type checking label Sep 4, 2022
@mroeschke mroeschke added this to the 1.6 milestone Sep 6, 2022
@mroeschke mroeschke merged commit 6f8ab49 into pandas-dev:main Sep 6, 2022
@mroeschke
Copy link
Member

Thanks @twoertwein (would be cool if autotyping could have a rule for this :) )

@twoertwein twoertwein deleted the context branch September 10, 2022 01:38
@mroeschke mroeschke modified the milestones: 1.6, 2.0 Oct 13, 2022
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Typing type annotations, mypy/pyright type checking

2 participants