Skip to content

Unsorted import block warning shows up in other cells #409

@Antyos

Description

@Antyos

Describe the bug

I manually added an import in the wrong location and it highlights the import block as unsorted (which makes sense), but also it's highlighting a function definition that uses one of those imports in one of its parameter type hints. So strange.

Image

Perhaps a hint may be that the DataFrameGroupBy import isn't being counted as "used" in the import block but it is later.

Edit, I take it back, the warning is showing up in all the other cells.

Environment

Details
marimo VS Code Extension Diagnostics
=====================================

Language Server (LSP):
	UV Bin: Bundled (c:\Users\Andrew\.vscode\extensions\marimo-team.vscode-marimo-0.10.4-win32-x64\bundled\libs\bin\uv.exe)
	UV: 0.9.26 (ee4f00362 2026-01-15) ✓
	Using bundled marimo-lsp via uvx

Python Extension:
	Interpreter: c:\Users\Andrew\Code\project\code\.venv\Scripts\python.exe
	Version: 3.13.9.final.0
	Environment: VirtualEnvironment (biaxtic)

Python Language Server (ty):
	Status: running ✓
	Version: 0.0.15 (eb43dff06 2026-02-04)
	Python: c:\Users\Andrew\Code\project\code\.venv\Scripts\python.exe (3.13.9.final.0)

Ruff Language Server:
	Status: running ✓
	Version: 0.15.0

Extension Configuration:
	Version: 0.10.4 
	UV integration disabled: false 

System Information:
	Host: desktop 
	IDE: Visual Studio Code 
	IDE version: 1.109.4 
	Platform: win32 
	Architecture: x64 
	Node version: v22.21.1 

Common Issues:
	1. If notebooks won't open:
		- Check Python interpreter is selected
		- Ensure marimo and pyzmq are installed
		- Check 'marimo-lsp' output channel for errors
	2. If features are missing:
		 - Ensure marimo version is >= 0.19.10
		- Try reloading the window

Steps to reproduce

Here's the notebook I'm using.

significance.py

As a side note, I tried deleting some of the cells to make it easier to share, but when I undid one of cell deletions, I got a bunch of these errors:

WARN Ignoring request id=800 method=textDocument/inlayHint because Document vscode-notebook-cell:/c%3A/Users/Andrew/Code/project/code/biaxtic/plotting/significance.py#W3sZmlsZQ%3D%3D is not open in the session 
2026-02-16 12:56:54.507 [error] Request textDocument/inlayHint failed.
  Message: Document vscode-notebook-cell:/c%3A/Users/Andrew/Code/project/code/biaxtic/plotting/significance.py#W3sZmlsZQ%3D%3D is not open in the session
  Code: -32602 

It seemed like a one-off, but I thought I'd note it anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions