Skip to content

[Python] type checker broken for pyarrow.compute and other sub-modules #50123

@robsdedude

Description

@robsdedude

I think adding a py.typed marker to the package before all public APIs are typed (even just with a whole bunch of Anys) wasn't ideal. Downstream users will now see a bunch of typing errors because type checkers now assume that pyarrow provides type hints that can be relied upon.

In my case, I'm seeing mypy complain about Module has no attribute "count" [attr-defined] where the module in question is pyarrow.compute.

Please consider either removing the marker until type hints are ready or to make sure all public APIs exist (at least as def xyz(*args: Any, **kwargs: Any) -> Any stubs). Or apply the same __getatrr__ placeholder to all modules, not just the top-level module.

Originally posted by @robsdedude in #48618 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions