Skip to content

TYP: make IOHandles generic #43855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 14, 2021
Merged

TYP: make IOHandles generic #43855

merged 6 commits into from
Nov 14, 2021

Conversation

twoertwein
Copy link
Member

@twoertwein twoertwein commented Oct 2, 2021

Towards #41610

This doesn't help with any ignore statements, as Buffer is defined as Buffer = Union[IO[AnyStr], RawIOBase, BufferedIOBase, TextIOBase, TextIOWrapper, mmap]: IO[AnyStr] will be replaced with IO[str] or IO[bytes].

btw., Buffer is a "bad" union as it contains one generic and many actual types (I think, I'm the one to blame for that). It is often used without an actual type (Buffer instead of Buffer[str] or Buffer[bytes]).

@pep8speaks
Copy link

pep8speaks commented Oct 2, 2021

Hello @twoertwein! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2021-11-14 03:38:45 UTC

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Oct 3, 2021
@jreback jreback added this to the 1.4 milestone Oct 3, 2021
@twoertwein
Copy link
Member Author

#43951 is a follow-up to this PR that also contains this PR. If #43951 isn't too large to review (it is large), I wouldn't mind simply skipping this PR.

@jreback
Copy link
Contributor

jreback commented Nov 5, 2021

lgtm @simonjayhawkins if any comments

@jreback
Copy link
Contributor

jreback commented Nov 14, 2021

can you merge merge master and can get this in

@twoertwein
Copy link
Member Author

@jreback green'ish

@jreback jreback merged commit ed7622c into pandas-dev:master Nov 14, 2021
@jreback
Copy link
Contributor

jreback commented Nov 14, 2021

thanks @twoertwein

@twoertwein twoertwein deleted the get_handle branch April 1, 2022 01:36
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants