Skip to content

TYP: annotation of __init__ return type (PEP 484) (pandas/io) #46284

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 3 commits into from
Mar 16, 2022

Conversation

nafarya
Copy link
Contributor

@nafarya nafarya commented Mar 8, 2022

According to documentation pandas uses PEP484 for type hints.
PEP484 states that __init__ function should have -> None return type annotation.
In this PR I added return type annotation to __init__ functions in pandas/io module.
Thanks!

@pep8speaks
Copy link

pep8speaks commented Mar 8, 2022

Hello @nafarya! 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 2022-03-09 19:48:54 UTC

@jreback jreback added this to the 1.5 milestone Mar 9, 2022
@jreback jreback added the Typing type annotations, mypy/pyright type checking label Mar 9, 2022
@nafarya nafarya force-pushed the TYP_io branch 3 times, most recently from 570cbc7 to c36be9e Compare March 9, 2022 19:48
@phofl
Copy link
Member

phofl commented Mar 9, 2022

Please wait for #46283 (comment)

@jreback jreback merged commit bd1263f into pandas-dev:main Mar 16, 2022
@jreback
Copy link
Contributor

jreback commented Mar 16, 2022

thanks @nafarya

@twoertwein
Copy link
Member

For some reason, this PR caused mypy to raise this error:

pandas/io/clipboard/init.py:97: error: Module has no attribute "WinError" [attr-defined]

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants