Skip to content

Conversation

@loicdiridollou
Copy link
Member

Resolution for:

  • read_orc (although there is no docs or tests in pandas repo to properly test that)
  • Timestamp - datetime64 (There is the typing to the rsub but mypy sees the wrong type)
  • tz_localize returning NaT (edge case of changing time with DST)

def read_orc(
path: FilePath | ReadBuffer[bytes],
columns: list[HashableT] | None = None,
dtype_backend: DtypeBackend | _NoDefaultDoNotUse = "numpy_nullable",
Copy link
Contributor

Choose a reason for hiding this comment

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

In 3.0 the default value will be switched from "numpy_nullable" to no_default. I think this can be confusing to users using the stable releases 2.x. What should we do @Dr-Irv ? Anyway, we can address this in a separate PR.

Comment on lines +103 to +104
# TODO: pandas-dev/pandas-stubs#1432 mypy sees datetime.timedelta but pyright is correct
# check(assert_type(ts_np - ts, pd.Timedelta), pd.Timedelta)
Copy link
Contributor

Choose a reason for hiding this comment

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

I see our __rsub__ is correct but mypy takes ts_np.__sub__ as a higher priority. This has happened a lot in Series and Index arithmetic. I think neither mypy nor pyright is correct, we should see Any here because of the discrepency. Do you have any suggestion to improve here, @Dr-Irv ?

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.

Issues from TODOs in timestamps.pyi, timedeltas.pyi and orc.pyi

2 participants