Skip to content

Conversation

simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Oct 22, 2019
@simonjayhawkins simonjayhawkins added this to the 1.0 milestone Oct 22, 2019
@WillAyd
Copy link
Member

WillAyd commented Oct 22, 2019

No problem with changing but what caused this issue exactly? Something we need to account for with pickle compat?

agg = aggregate

def _iterate_slices(self) -> Iterable[Tuple[Hashable, Series]]:
def _iterate_slices(self) -> Iterable[Tuple[Optional[Hashable], Series]]:
Copy link
Member

Choose a reason for hiding this comment

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

note there is a similar definition for SeriesGroupBy - not sure if that needs to change as well

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe IndexLabel = Optional[Hashable] in _typing.py

@simonjayhawkins
Copy link
Member Author

No problem with changing but what caused this issue exactly? Something we need to account for with pickle compat?

no. with check_untyped_defs (i.e. checks body of _unpickle_series_compat)..

None is assigned to name: index, name = own_state[0], None

and then assigned to self.name: self.name = name

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm

@TomAugspurger TomAugspurger merged commit bef9bae into pandas-dev:master Oct 22, 2019
@TomAugspurger
Copy link
Contributor

Thanks!

@simonjayhawkins simonjayhawkins deleted the hashable branch October 23, 2019 09:28
HawkinsBA pushed a commit to HawkinsBA/pandas that referenced this pull request Oct 29, 2019
* TYPING : Series.name -> Optional[Hashable]
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
* TYPING : Series.name -> Optional[Hashable]
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
* TYPING : Series.name -> Optional[Hashable]
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
* TYPING : Series.name -> Optional[Hashable]
bongolegend pushed a commit to bongolegend/pandas that referenced this pull request Jan 1, 2020
* TYPING : Series.name -> Optional[Hashable]
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