Skip to content

infer_objects type stub missing copy arg #1337

@janosh

Description

@janosh

both calls to infer_objects on pandas DataFrame and Series trigger

Argument copy does not match any known parameter of bound method infer_objects

import pandas as pd

df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6], "C": [7, 8, 9]})

df.infer_objects(copy=False)
df.A.infer_objects(copy=False)

i ran into this with ty 0.0.1-alpha.19 (e9cb838b3 2025-08-19) but get the same error with mypy==1.14.1.

initially reported in astral-sh/ty#1076

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