Recognize that the parameter level for pandas.Index.get_level_values(level) can be of type str or int.
Pylance incorrectly reports that the parameter level for pandas.Index.get_level_values(level) must be a string:

Should not return errors:
import pandas as pd
pd.Index(['ds']).get_level_values(0)
Please let me know how I can improve this bug report because many more will follow (all for typeshed issues). Is this the best repo for such bug reports? (I am following the precedent of Pandas type issues in the release notes.)
https://github.com/microsoft/python-type-stubs is the new canonical source for these stubs, for reference.
microsoft/python-type-stubs is the new canonical source for these stubs, for reference.
@jakebailey Thank you! Would it be more efficient for me to create these issues in that repo? Or, does that repo not receive the same degree of visibility? I'm happy to do whichever is easiest for you. 馃檪
That's a great question, because on one hand we want to close issues here so people know we shipped the stubs in Pylance, but on the other, it'd be nice for them to be in the repo they are fixed in... I don't know if we have a solid answer yet, that repo is very new (and then we all went on break for the holidays).
No harm in having these here at the moment, transferring is easy.
This issue has been fixed in version 2021.3.2, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202132-17-march-2021