marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Polars `pl.Expr.filter` function signature not accurate

Open henryharbeck opened this issue 7 months ago • 2 comments

Describe the bug

Type pl.col("").filter() in a marimo cell and hover over the filter method.

Note that the displayed function signature is missing the *predicates parameter

Image

*predicates can be seen in the parameters section and here in the Polars docs

As seen in the "environment" section, I am on the current version of Polars.

Environment

{
  "marimo": "0.13.2",
  "OS": "Linux",
  "OS Version": "5.15.167.4-microsoft-standard-WSL2",
  "Processor": "x86_64",
  "Python Version": "3.11.8",
  "Binaries": {
    "Browser": "--",
    "Node": "v18.20.3"
  },
  "Dependencies": {
    "click": "8.1.8",
    "docutils": "0.21.2",
    "itsdangerous": "2.2.0",
    "jedi": "0.19.2",
    "markdown": "3.8",
    "narwhals": "1.36.0",
    "packaging": "25.0",
    "psutil": "7.0.0",
    "pygments": "2.19.1",
    "pymdown-extensions": "10.14.3",
    "pyyaml": "6.0.2",
    "starlette": "0.46.2",
    "tomlkit": "0.13.2",
    "typing-extensions": "4.13.2",
    "uvicorn": "0.34.2",
    "websockets": "15.0.1"
  },
  "Optional Dependencies": {
    "polars": "1.27.1",
    "pycrdt": "0.11.1",
    "ruff": "0.11.7"
  },
  "Experimental Flags": {}
}

Code to reproduce

No response

henryharbeck avatar Apr 25 '25 15:04 henryharbeck

@henryharbeck, could you please file this in the Polars repo? I think this is a bug in Polars and Jedi playing together. (similar to https://github.com/pola-rs/polars/issues/16933)

mscolnick avatar Apr 25 '25 15:04 mscolnick

Thanks @mscolnick, that makes sense - my apologies.

Have raised the issue linked above

henryharbeck avatar Apr 29 '25 21:04 henryharbeck

@henryharbeck, could you please file this in the Polars repo? I think this is a bug in Polars and Jedi playing together. (similar to pola-rs/polars#16933)

I took a look; doesn't seem to be a Polars issue (and is definitely unrelated to the previous autocomplete fix/enhancement), so I have closed the issue on our side.

The Marimo/Jedi stack seems to be experiencing a specific edge-case related to the first parameter name - if I do nothing but locally rename it to seemingly anything other than *predicates then everything works as expected 🤔

More details in the linked comment: https://github.com/pola-rs/polars/issues/22509#issuecomment-2844211720

alexander-beedie avatar May 01 '25 06:05 alexander-beedie

It looks likes its coming from Jedi then, but I cannot re-produce it outside of polars:

https://marimo.app/l/mfuvly

Image

mscolnick avatar May 01 '25 15:05 mscolnick