Skip to content

Conversation

@Dr-Irv
Copy link
Contributor

@Dr-Irv Dr-Irv commented Mar 21, 2022

Various fixes that were identified by applying pylance 2022.3.2 to our code:

  • Multiplication of a number and an untyped series keeps it untyped (was Series[Timedelta])
  • Multiplication of a series and Series[Timedelta] gives Series[Timedelta]
  • Series[Timestamp] minus Timedelta or Series[Timedelta] gives Series[Timestamp]
  • MultiIndex.astype returns MultiIndex
  • DataFrame.__setitem__ needs to accept IndexSlice as an argument on a single column
  • Series[Timedelta] plus DatetimeIndex is Series[Timestamp]
  • to_timedelta returns Series[Timedelta] when passed a Series
  • DatetimeIndex plus timedeltas is DatetimeIndex

Note: There are probably other arithmetic things we need to fix as well related to Timestamp and Timedelta

- Multiplication of a number and an untyped series keeps it untyped (was Series[Timedelta])
- Multiplicaiton of a series and Series[Timedelta] gives Series[Timedelta]
- Series[Timestamp] minus Timedelta or Series[Timedelta] gives Series[Timestamp]
- MultiIndex.astype returns MultiIndex
- DataFrame.__setitem__ needs to accept IndexSlice as an argument on a single column
- Series[Timedelta] plus DatetimeIndex is Series[Timestamp]
- to_timedelta returns Series[Timedelta] when passed a Series
- DatetimeIndex plus timedeltas is DatetimeIndex
@bschnurr bschnurr merged commit 42a227c into microsoft:main Mar 23, 2022
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.

2 participants