Skip to content

Conversation

@EkaterinaKuzkina
Copy link
Contributor

@EkaterinaKuzkina EkaterinaKuzkina commented Mar 7, 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/core/computation module

@EkaterinaKuzkina EkaterinaKuzkina changed the title TYP: annotation of __init__ return type (PEP 484) TYP: annotation of __init__ return type (PEP 484) (pandas/core/computation) Mar 7, 2022
@jreback jreback added the Typing type annotations, mypy/pyright type checking label Mar 8, 2022
@jreback jreback added this to the 1.5 milestone Mar 8, 2022
@jreback jreback merged commit 5544b6d into pandas-dev:main Mar 8, 2022
@jreback
Copy link
Contributor

jreback commented Mar 8, 2022

thanks @EkaterinaKuzkina

@EkaterinaKuzkina EkaterinaKuzkina deleted the TYP_core_computation branch March 8, 2022 22:13
@twoertwein
Copy link
Member

While I prefer having the explicit None annotation, I think @simonjayhawkins (and others) did not like the idea of adding None, I think because it is not needed, __init__ can never return anything else.

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.

3 participants