10000 Typeinterval part2 by Dr-Irv · Pull Request #46098 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Typeinterval part2 #46098

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 24 commits into from
Feb 27, 2022
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9e57d6d
fix column_arrays for array manager
Dr-Irv Dec 21, 2021
2abbc57
merge with upstream/main
Dr-Irv Jan 15, 2022
99158b1
Merge remote-tracking branch 'upstream/main'
Dr-Irv Jan 24, 2022
0f4130d
Merge remote-tracking branch 'upstream/main'
Dr-Irv Feb 4, 2022
24ecfe2
Merge remote-tracking branch 'upstream/main'
Dr-Irv Feb 8, 2022
64f00d5
Merge remote-tracking branch 'upstream/main'
Dr-Irv Feb 9, 2022
1ee6e00
Merge remote-tracking branch 'upstream/main'
Dr-Irv Feb 19, 2022
34dc181
fix up typing to eventually support Interval typing
Dr-Irv Feb 20, 2022
a547800
fix imports in core/tools/datetimes.py
Dr-Irv Feb 20, 2022
3a3bfea
fix time in odfreader
Dr-Irv Feb 20, 2022
5edf5c9
pandas/core/arrays/masked.py
Dr-Irv Feb 21, 2022
7c4cd5c
use cast instead of new code in odfreader
Dr-Irv Feb 21, 2022
649ef07
fix odfreader
Dr-Irv Feb 21, 2022
1c1ba2c
interval pyi
Dr-Irv Feb 21, 2022
35c2af0
use cast in odfreader
Dr-Irv Feb 21, 2022
9769356
use cast in odfreader
Dr-Irv Feb 21, 2022
607b367
fixes for mid, length to mixin, change use of protocol
Dr-Irv Feb 21, 2022
f9f0820
misc cleanup from twoertwein
Dr-Irv Feb 22, 2022
52f376f
remove generic from IntervalTree
Dr-Irv Feb 22, 2022
40be56f
Merge remote-tracking branch 'upstream/main' into typeinterval_part1
Dr-Irv Feb 23, 2022
4fcf523
clean up based on comments. simplify python_parser changes. Introduc…
Dr-Irv Feb 23, 2022
3b68c6a
Merge branch 'typeinterval_part1' into typeinterval_part2
Dr-Irv Feb 23, 2022
d6de171
Merge remote-tracking branch 'upstream/main' into typeinterval_part2
Dr-Irv Feb 27, 2022
9e11b8c
Feedback from twoertwein
Dr-Irv Feb 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes for mid, length to mixin, change use of protocol
  • Loading branch information
Dr-Irv committed Feb 21, 2022
commit 607b367ab0dade96529f01a2cae2b661393c2d1c
27 changes: 17 additions & 10 deletions pandas/_libs/interval.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,27 @@ class _LengthDescriptor:
@overload
def __get__(self, instance: Interval[OrderableTimesT], owner: Any) -> Timedelta: ...

class IntervalMixin:
@property
def closed_left(self: IntervalMixinProtocol) -> bool: ...
class _MidDescriptor:
@overload
def __get__(self, instance: Interval[OrderableScalarT], owner: Any) -> float: ...
@overload
def __get__(self, instance: Interval[Timedelta], owner: Any) -> Timedelta: ...
@overload
def __get__(self, instance: Interval[Timestamp], owner: Any) -> Timestamp: ...

class IntervalMixin(IntervalMixinProtocol):
@property
def closed_right(self: IntervalMixinProtocol) -> bool: ...
def closed_left(self) -> bool: ...
@property
def open_left(self: IntervalMixinProtocol) -> bool: ...
def closed_right(self) -> bool: ...
@property
def open_right(self: IntervalMixinProtocol) -> bool: ...
def open_left(self) -> bool: ...
@property
def mid(self: IntervalMixinProtocol) -> float: ...
def open_right(self) -> bool: ...
mid: _MidDescriptor
length: _LengthDescriptor
@property
def is_empty(self: IntervalMixinProtocol) -> bool: ...
def is_empty(self) -> bool: ...
def _check_closed_matches(self, other: IntervalMixin, name: str = ...): ...

class Interval(IntervalMixin, Generic[OrderableT]):
Expand All @@ -64,9 +72,8 @@ class Interval(IntervalMixin, Generic[OrderableT]):
self,
left: OrderableT,
right: OrderableT,
closed: Union[str, Literal["left", "right", "both", "neither"]] = ...,
closed: Literal["left", "right", "both", "neither"] = ...,
): ...
length: _LengthDescriptor
def __hash__(self) -> int: ...
@overload
def __contains__(self: Interval[OrderableTimesT], OrderableTimesT) -> bool: ...
Expand Down
0