Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

type annotation for Index/MultiIndex.names is incorrect #804

Copy link
Copy link
Open
@tswast

Description

@tswast
Issue body actions

Describe the bug

type annotation for Index/MultiIndex.names is incorrect

To Reproduce

  1. Provide a minimal runnable pandas example that is not properly checked by the stubs.
In [1]: import pandas as pd

In [2]: df = pd.DataFrame({"a": ["a", "b", "c"], "i": [10, 11, 12]}, index=pd.Index([5, 10, 15], name="idx"))

In [4]: df.index.names
Out[4]: FrozenList(['idx'])

In [5]: df.index.names = (None,)

In [6]: df.index.names
Out[6]: FrozenList([None])
  1. Indicate which type checker you are using (mypy or pyright).

mypy

  1. Show the error message received from that type checker while checking your example.

bigframes/core/blocks.py:436: error: Incompatible types in assignment (expression has type "tuple[None]", variable has type "list[str]") [assignment]

Please complete the following information:

  • OS: [e.g. Windows, Linux, MacOS] Linux
  • OS Version [e.g. 22]

Distributor ID: Debian
Description: Debian GNU/Linux rodete
Release: n/a
Codename: rodete

  • python version Python 3.10.9
  • version of type checker mypy==1.5.1
  • version of installed pandas-stubs pandas-stubs==2.0.3.230814

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BlockedRequires external dependency before progressingRequires external dependency before progressingIndexRelated to the Index class or subclassesRelated to the Index class or subclassesgood first issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.