Skip to content

TYP: fix MultiIndex._names type #46919

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 2 commits into from
May 21, 2022
Merged

Conversation

iasoon
Copy link
Contributor

@iasoon iasoon commented May 1, 2022

xref #37715

_names was never really a FrozenList.
Also adapted some related code in _count_level
The change in _count_level is required because list cannot be indexed by Hashable - this issue had not been detected by mypy up until now because the argument of __getitem__ is untyped for FrozenList.

@iasoon iasoon marked this pull request as draft May 1, 2022 17:13
@iasoon iasoon force-pushed the typing/multiindex_names branch from dc89867 to 2590553 Compare May 1, 2022 18:02
@iasoon iasoon marked this pull request as ready for review May 1, 2022 18:48
@twoertwein twoertwein added the Typing type annotations, mypy/pyright type checking label May 6, 2022
@iasoon iasoon force-pushed the typing/multiindex_names branch from 2590553 to 1f33af4 Compare May 12, 2022 22:26
@jreback jreback added this to the 1.5 milestone May 21, 2022
@jreback jreback merged commit e039117 into pandas-dev:main May 21, 2022
@jreback
Copy link
Contributor

jreback commented May 21, 2022

thanks @iasoon

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