Skip to content

update pyright, numpy. fix issues 664 and 662 #667

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
Apr 30, 2023

Conversation

Dr-Irv
Copy link
Collaborator

@Dr-Irv Dr-Irv commented Apr 30, 2023

Update to numpy 1.24.3, pandas 2.0.1, pyright 1.1.305

@Dr-Irv Dr-Irv requested a review from twoertwein April 30, 2023 02:50

class IntervalSeries(Series, Generic[_OrderableT]):
@property
def array(self) -> IntervalArray: ...
Copy link
Member

Choose a reason for hiding this comment

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

Why doesn't it work to add overloads instead of creating a helper class here? Not sure whether mypy finally accepts overload+property.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Why doesn't it work to add overloads instead of creating a helper class here? Not sure whether mypy finally accepts overload+property.

I couldn't see how to get even pyright to support overload with property .

Copy link
Member

Choose a reason for hiding this comment

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

I thought at least pyright supports that - but I haven't tried it.

I think even if mypy+pyright support property+overload, we probably wouldn't want to use it as the first overload would need to be the more specific overload returning IntervalArray but we shouldn't return that for Series[Any/Unknown].

@twoertwein twoertwein merged commit 55fca56 into pandas-dev:main Apr 30, 2023
@twoertwein
Copy link
Member

Thanks @Dr-Irv !

@Dr-Irv Dr-Irv deleted the issue664 branch December 2, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants