Skip to content

Conversation

@kshitiz305
Copy link

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Can you add a test to tests/test_indexes.py that instantiates a RangeIndex with a range argument, using check and assert_type as in other tests?

@kshitiz305
Copy link
Author

Can you add a test to tests/test_indexes.py that instantiates a RangeIndex with a range argument, using check and assert_type as in other tests?

let me push the code with the required test.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented May 21, 2023

@kshitiz305 checking on status of this PR

@kshitiz305
Copy link
Author

@Dr-Irv Kindly have a look test for the range have been pushed

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented May 24, 2023

So there is a failure because pyright 1.1.309 started finding a whole bunch of issues. Trying to figure out what version to pin pyright to so things will work

@Dr-Irv Dr-Irv mentioned this pull request May 24, 2023
@Dr-Irv
Copy link
Collaborator

Dr-Irv commented May 24, 2023

Once #709 is merged, you will need to merge that in and revert changes to the 2 files I indicated.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented May 24, 2023

@kshitiz305 #709 has been merged, so can you merge with main, fix the reported issues, and push, then we can run the tests to see if everything works

pyproject.toml Outdated
[tool.poetry]
name = "pandas-stubs"
version = "2.0.1.230501"
version = "2.0.1.230507"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please revert this change.

Copy link
Member

Choose a reason for hiding this comment

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

I think you can simply run git checkout <commit hash from before you made any changes> pandas-stubs/_version.pyi pyproject.toml to revert these two files to what they were before.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

You also should do poetry run poe style before the next push, as the CI is failing because of that.

@kshitiz305
Copy link
Author

@Dr-Irv commit 6d89c40

Could you help me with this if this shall include the new or __ init__ as this is leading a confusion and also failing pyright

def __init__(
self,
start: int | RangeIndex = ...,
cls,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be self, because it is in __init__()

I think this is the cause of the pyright error you are getting.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Aug 13, 2023

@kshitiz305 can you merge with main and get this finished up?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pd.RangeIndex should accept range as the first argument

3 participants