Skip to content

TYPING: lockdown test modules passing mypy #28914

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 1 commit into from
Oct 11, 2019

Conversation

simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Oct 11, 2019
@simonjayhawkins simonjayhawkins changed the title TYPING: lockdown test modules failing mypy TYPING: lockdown test modules passing mypy Oct 11, 2019
@WillAyd
Copy link
Member

WillAyd commented Oct 11, 2019

Are some of these easy to fix? Would be nice to keep the setup.cfg small if could do as precursors

@simonjayhawkins
Copy link
Member Author

maybe, not really looked in detail. and I personally won't be prioritising this over the main codebase.

it was so others, could add type hints to the tests and have them checked(well most of them) see #28904

also if doing it on a per module basis, easier to confirm in review if the module is also removed from setup.cfg (process adopted for check_untyped_defs, seems to work well)

@WillAyd
Copy link
Member

WillAyd commented Oct 11, 2019

Sounds good. No major objection from me - @jreback any thoughts?

@simonjayhawkins
Copy link
Member Author

not at desktop atm. will give you a better idea of the workload tomorrow. i think it was about 200 errors. but many duplicates. and some files might only have a couple.

I think if the extra noise in setup.cfg is an issue, we could consider using mypy.ini

@jreback
Copy link
Contributor

jreback commented Oct 11, 2019

didn’t we use mypy.ini as some point?

i guess that’s better

@WillAyd
Copy link
Member

WillAyd commented Oct 11, 2019

Yea went from mypy.ini to setup.cfg in #27427 - I don't know if there are any real nuances to going back so would be OK with that

@jreback jreback added this to the 1.0 milestone Oct 11, 2019
@jreback jreback merged commit 230a61a into pandas-dev:master Oct 11, 2019
@jreback
Copy link
Contributor

jreback commented Oct 11, 2019

ok, yeah let's keep in the same

@simonjayhawkins
Copy link
Member Author

FYI xref #28910

now that this is on master, a mypy bump to 0.730 would break ci

$ mypy pandas
pandas\tests\indexes\datetimes\test_tools.py:270: error: Module has no attribute "FixedOffset"
pandas\tests\indexes\datetimes\test_tools.py:275: error: Module has no attribute "FixedOffset"
pandas\tests\indexes\datetimes\test_tools.py:281: error: Module has no attribute "FixedOffset"
pandas\tests\indexes\datetimes\test_tools.py:282: error: Module has no attribute "FixedOffset"
pandas\tests\indexes\datetimes\test_tools.py:290: error: Module has no attribute "FixedOffset"
pandas\tests\indexes\datetimes\test_tools.py:292: error: Module has no attribute "FixedOffset"
pandas\tests\indexes\datetimes\test_tools.py:2082: error: Module has no attribute "FixedOffset"
pandas\tests\indexes\datetimes\test_tools.py:2087: error: Module has no attribute "FixedOffset"
Found 8 errors in 1 file (checked 805 source files)

PR coming soon. just parking here for reference.

@simonjayhawkins simonjayhawkins deleted the enable-mypy-for-tests branch October 11, 2019 13:43
simonjayhawkins added a commit to simonjayhawkins/pandas that referenced this pull request Oct 12, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
bongolegend pushed a commit to bongolegend/pandas that referenced this pull request Jan 1, 2020
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