Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

chore: align local ruff with CI's dependency window (#9732)

Kiran Gadhave36fdf3b8ddbe
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 332e5b21de..345ce7ec73 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -39,7 +39,7 @@ repos:
types: [python]
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.15.10
+ rev: v0.15.14
hooks:
# Run the linter
- id: ruff-check
diff --git a/marimo/_ai/_tools/tools/cells.py b/marimo/_ai/_tools/tools/cells.py
index 33d4eb5c33..63702fc762 100644
--- a/marimo/_ai/_tools/tools/cells.py
+++ b/marimo/_ai/_tools/tools/cells.py
@@ -24,7 +24,6 @@ from marimo._messaging.notification import (
from marimo._types.ids import CellId_t, SessionId
if TYPE_CHECKING:
- from marimo._ast.models import CellData
from marimo._session import Session
diff --git a/marimo/_ast/app.py b/marimo/_ast/app.py
index f97c4c3cde..9fef1a13a2 100644
--- a/marimo/_ast/app.py
+++ b/marimo/_ast/app.py
@@ -66,7 +66,6 @@ from marimo._schemas.serialization import (
from marimo._types.ids import CellId_t
if TYPE_CHECKING:
- from collections.abc import Sequence
from types import FrameType, TracebackType
from typing import TypeGuard
diff --git a/marimo/_lint/linter.py b/marimo/_lint/linter.py
index e421ee3f06..43d9fbe379 100644
--- a/marimo/_lint/linter.py
+++ b/marimo/_lint/linter.py
@@ -3,7 +3,6 @@ from __future__ import annotations
import asyncio
import re
-from collections.abc import AsyncIterator, Iterator
from dataclasses import dataclass, field
from pathlib import Path
from typing import TYPE_CHECKING
diff --git a/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py b/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py
index 62f3eb2149..175fa25146 100644
--- a/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py
+++ b/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py
@@ -3,7 +3,6 @@ from __future__ import annotations
import datetime
import decimal
-from collections.abc import Callable
from functools import reduce
from typing import TYPE_CHECKING, Any
diff --git a/marimo/_plugins/ui/_impl/table.py b/marimo/_plugins/ui/_impl/table.py
index 23b9bac746..78db3bd387 100644
--- a/marimo/_plugins/ui/_impl/table.py
+++ b/marimo/_plugins/ui/_impl/table.py
@@ -2,7 +2,6 @@
from __future__ import annotations
import functools
-from collections.abc import Callable
from dataclasses import dataclass
from typing import (
TYPE_CHECKING,
@@ -14,7 +13,7 @@ from typing import (
)
if TYPE_CHECKING:
- from collections.abc import Mapping
+ from collections.abc import Callable, Mapping
from narwhals.typing import IntoDataFrame
@@ -78,7 +77,7 @@ from marimo._utils.narwhals_utils import (
)
if TYPE_CHECKING:
- from collections.abc import Callable, Sequence
+ from collections.abc import Sequence
from narwhals.typing import IntoLazyFrame
diff --git a/marimo/_runtime/complete.py b/marimo/_runtime/complete.py
index 97af4a57b6..3b73ceacf0 100644
--- a/marimo/_runtime/complete.py
+++ b/marimo/_runtime/complete.py
@@ -5,7 +5,6 @@ import ast
import html
import re
import sys
-import threading
import time
from collections.abc import Collection, Mapping
from functools import lru_cache
diff --git a/marimo/_utils/narwhals_utils.py b/marimo/_utils/narwhals_utils.py
index 9b0f85d434..885fff3dbb 100644
--- a/marimo/_utils/narwhals_utils.py
+++ b/marimo/_utils/narwhals_utils.py
@@ -10,7 +10,6 @@ import narwhals as nw_main
import narwhals.dtypes as nw_dtypes
import narwhals.stable.v1 as nw1
import narwhals.stable.v2 as nw
-from narwhals.typing import IntoDataFrame
from marimo import _loggers
diff --git a/pyproject.toml b/pyproject.toml
index 8f73c28d8a..84e801561e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -287,6 +287,11 @@ docs = [
]
+[tool.uv]
+# Mirror CI's dependency window (UV_EXCLUDE_NEWER in .github/workflows) so local
+# resolution reproduces what CI resolves at setup time, including the ruff version.
+exclude-newer = "7 days"
+
[tool.uv.sources]
marimo_docs = { path = "./docs", editable = true }
diff --git a/tests/_runtime/test_manage_script_metadata.py b/tests/_runtime/test_manage_script_metadata.py
index ae00199ac5..3eebba93cf 100644
--- a/tests/_runtime/test_manage_script_metadata.py
+++ b/tests/_runtime/test_manage_script_metadata.py
@@ -1,7 +1,6 @@
# Copyright 2026 Marimo. All rights reserved.
from __future__ import annotations
-import pathlib
from typing import TYPE_CHECKING, Any, cast
from unittest.mock import AsyncMock, Mock, call, patch