Skip to content

oinspect throws TypeError when parsing incomplete code line involving polars.expr.expr #15072

@ethan-tau

Description

@ethan-tau

What:
oinspect.info method throws a TypeError when parsing incomplete code line, erasing partial line entry and overwriting with stacktrace with this line in oinspect:
parents_docs = parents_docs_dict.get(att_name, None)

This is triggered when composing a line involving Polars expression object, polars.expr.expr.Expr.

For example, this partial entry in a qtconsole window triggers an Exception:

pl.col("a").le(

But the proper tool tip is shown with the following:

my_expr = pl.col("a")
my_expr.le(

Since this Issue involves multiple repos, it is also reported in:

Versions:

  • Polars '1.35.2'
  • IPython '9.7.0'
  • Jupyter QtConsole 5.7.0
  • Python 3.13.2

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