Autocomplete does not find suggestions in polars namespaces
Describe the bug
When using polars the marimo autocomplete is unable to find any suggestions for names that are within namespaces. For example, here is what the autocomplete shows for the dt namespace.
Here is what VS Code shows:
Environment
{ "marimo": "0.10.7", "OS": "Darwin", "OS Version": "24.2.0", "Processor": "arm", "Python Version": "3.13.1", "Binaries": { "Browser": "--", "Node": "v23.5.0" }, "Dependencies": { "click": "8.1.3", "docutils": "0.21.2", "itsdangerous": "2.2.0", "jedi": "0.19.2", "markdown": "3.7", "narwhals": "1.19.1", "packaging": "24.2", "psutil": "6.1.1", "pygments": "2.18.0", "pymdown-extensions": "10.13", "pyyaml": "6.0.2", "ruff": "0.6.9", "starlette": "0.42.0", "tomlkit": "0.13.2", "typing-extensions": "4.12.2", "uvicorn": "0.34.0", "websockets": "14.1" }, "Optional Dependencies": { "altair": "5.5.0", "duckdb": "1.1.3", "pandas": "2.2.3", "polars": "1.17.1", "pyarrow": "18.1.0" } }
Code to reproduce
import polars as pl
pl.col("col_name").dt
Thanks for reporting!
I did some digging. I've opened an issue in the Polars repository, as they've been helpful in resolving similar issues in the past: https://github.com/pola-rs/polars/issues/20496
IPython has the same issue:
As does jedi (which marimo uses for completion).
The issue I created is a duplicate of https://github.com/pola-rs/polars/issues/16933. I consider this blocked on upstream (Polars), short of us switching to a different technology to power completions.
Have you considered using PyRight to do autocompletions? Using that at least this example ends autocompleting correctly
Good news; can confirm this upcoming fix addresses both IPython and Marimo... 😎 https://github.com/pola-rs/polars/pull/22221
Awesome, thanks @alexander-beedie! Closing this on our end