Skip to content

python 3.12 and pyright 1.1.334 error: Method "fromtimestamp" overrides class "datetime" in an incompatible manner #813

Closed
@dangjinghao

Description

@dangjinghao

Describe the bug
I'm Follwing the setup.md to set up an development envirment. When I execute poe test_all .Pyright test cannot be finished and prints this error message.

To Reproduce

  1. Provide a minimal runnable pandas example that is not properly checked by the stubs.
    unit test in tests/
  2. Indicate which type checker you are using (mypy or pyright).
    pyright
  3. Show the error message received from that type checker while checking your example.
prompt> poe test_all                                                                         (pandas_stubs_test) 
Poe => test_all

===========================================
Beginning: 'Run mypy on 'tests' (using the local stubs) and on the local stubs'
===========================================

Success: no issues found in 224 source files

===========================================
End: 'Run mypy on 'tests' (using the local stubs) and on the local stubs', runtime: 27.658 seconds.
===========================================


===========================================
Beginning: 'Run pyright on 'tests' (using the local stubs) and on the local stubs'
===========================================

/pathto/pandas_stubs_test/pandas_stubs_v2/pandas-stubs/_libs/tslibs/timestamps.pyi
  /pathto/pandas_stubs_test/pandas_stubs_v2/pandas-stubs/_libs/tslibs/timestamps.pyi:103:9 - error: Method "fromtimestamp" overrides class "datetime" in an incompatible manner
    Parameter 2 name mismatch: base parameter is named "timestamp", override parameter is named "t" (reportIncompatibleMethodOverride)
1 error, 0 warnings, 0 informations 

===========================================
Step: 'Run pyright on 'tests' (using the local stubs) and on the local stubs' failed!
===========================================
  • OS: archlinux
  • OS Version kernel version: 6.5.8
  • python version 3.12.0
  • version of type checker pyright 1.1.334
  • version of installed pandas-stubs 2.1.1.230928

Additional context
I didn't modify anything in this project.

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