Skip to content
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

Fix type annotation in pandas. version #25949

Merged

Conversation

vaibhavhrt
Copy link
Contributor

@vaibhavhrt vaibhavhrt commented Apr 1, 2019

Also remove this module from mypy.ini

@vaibhavhrt
Copy link
Contributor Author

It's a little hard for me figure out what exactly is the type if key/values of the dictionary of both the variables I have typed. Please take a look if it's alright.

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this pass locally for you? I think containers like Dict need the types to be explicitly stated as part of the annotation

pandas/_version.py Outdated Show resolved Hide resolved
pandas/_version.py Outdated Show resolved Hide resolved
@WillAyd WillAyd added the Typing type annotations, mypy/pyright type checking label Apr 1, 2019
… register_vcs_handler

L52: LONG_VERSION_PY looks like dead.
@codecov
Copy link

codecov bot commented Apr 1, 2019

Codecov Report

Merging #25949 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25949      +/-   ##
==========================================
- Coverage   91.82%   91.81%   -0.01%     
==========================================
  Files         175      175              
  Lines       52581    52581              
==========================================
- Hits        48280    48275       -5     
- Misses       4301     4306       +5
Flag Coverage Δ
#multiple 90.36% <ø> (ø) ⬆️
#single 41.9% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 75% <0%> (-12.5%) ⬇️
pandas/core/frame.py 96.79% <0%> (-0.12%) ⬇️
pandas/util/testing.py 90.63% <0%> (-0.11%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7c4c94...802873e. Read the comment docs.

@codecov
Copy link

codecov bot commented Apr 1, 2019

Codecov Report

Merging #25949 into master will decrease coverage by 2.08%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #25949      +/-   ##
==========================================
- Coverage   91.82%   89.73%   -2.09%     
==========================================
  Files         175      175              
  Lines       52581    56159    +3578     
==========================================
+ Hits        48280    50397    +2117     
- Misses       4301     5762    +1461
Flag Coverage Δ
#multiple 90.4% <ø> (+0.04%) ⬆️
#single 43.21% <ø> (+1.24%) ⬆️
Impacted Files Coverage Δ
pandas/core/base.py 77.55% <0%> (-20.22%) ⬇️
pandas/core/strings.py 82.37% <0%> (-16.22%) ⬇️
pandas/core/arrays/sparse.py 77.46% <0%> (-14.72%) ⬇️
pandas/core/series.py 80.73% <0%> (-12.94%) ⬇️
pandas/io/gbq.py 75% <0%> (-12.5%) ⬇️
pandas/io/formats/format.py 86.83% <0%> (-11.05%) ⬇️
pandas/io/parsers.py 85.34% <0%> (-10.45%) ⬇️
pandas/core/internals/construction.py 86.29% <0%> (-9.6%) ⬇️
pandas/compat/pickle_compat.py 61% <0%> (-8.14%) ⬇️
pandas/core/reshape/util.py 92.59% <0%> (-7.41%) ⬇️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c7c4c94...3ed8317. Read the comment docs.

@vaibhavhrt
Copy link
Contributor Author

Someone please take a look at the travis tests. It has passed on travis but it's stuck on pending here for quite some time.

@WillAyd
Copy link
Member

WillAyd commented Apr 4, 2019

Just restarted it to make sure

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I think this works. We might want to revisit the decorator typing options as they evolve in MyPy but I don't think that's a blocker for this PR.

@jreback

@WillAyd WillAyd added this to the 0.25.0 milestone Apr 4, 2019
@jreback jreback merged commit 8b15dff into pandas-dev:master Apr 4, 2019
@jreback
Copy link
Contributor

jreback commented Apr 4, 2019

this is fine, we don't expect to edit this file anyhow, its just for import time versions

@vaibhavhrt vaibhavhrt deleted the Fix-Type-Anootation-in-pandas._version branch April 4, 2019 13:11
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.

Fix Type Annotations in pandas/_version.py
3 participants