Skip to content

pyrefly report counts stub functions as untyped if they're re-exported in the .py module #3524

@jorenham

Description

@jorenham

For example, in NumPy, pyrefly reports

        {
          "kind": "attr",
          "name": "numpy._core.multiarray.array",
          "n_typable": 1,
          "n_typed": 0,
          "n_any": 0,
          "n_untyped": 1,
          "location": {
            "line": 36,
            "column": 49
          }
        },

for the fully typed array function (so not an attr): https://github.com/numpy/numpy/blob/b832a09cf2a169c833dd2371e7c07aa00b293242/numpy/_core/multiarray.pyi#L458-L517

This seems to be related to the fact that this array function is not directly defined in the corresponding .py; it instead re-exports it (from a C extension module).

Metadata

Metadata

Assignees

No one assigned

    Labels

    quansightreportIssues related to `pyrefly report`

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions