Skip to content

No types for DatetimeIndex attributes #193

Closed
@ruler501

Description

@ruler501

Describe the bug

import pandas

x = pandas.DatetimeIndex()
x.month

Fails to typecheck in mypy even though this attribute is documented here https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.month.html

To Reproduce

  1. Run type checker of your choice on the above snippet with latest version of pandas and pandas-stubs

Please complete the following information:

  • OS: Linux
  • OS Version NixOS unstable
  • python version 3.9.13
  • version of type checker mypy 0.971
  • version of installed pandas-stubs 1.4.3.220807

Additional context
Also tested with pyright language server and got same error, not sure what version of pyright.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions