From 9c2a77e063e62e676a391ea1a6314a875fd866ca Mon Sep 17 00:00:00 2001 From: Kiran Gadhave Date: Fri, 29 May 2026 12:11:17 -0700 Subject: [PATCH] chore: pin ruff to 0.15.15 and apply autofixes Align local lint with CI by pinning ruff everywhere (.pre-commit-config.yaml rev, pyproject.toml dev floor) and committing the resulting import-relocation and unused-import autofixes. --- .pre-commit-config.yaml | 2 +- marimo/_ai/_tools/tools/cells.py | 1 - marimo/_ast/app.py | 1 - marimo/_lint/linter.py | 1 - marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py | 1 - marimo/_plugins/ui/_impl/table.py | 5 ++--- marimo/_runtime/complete.py | 1 - marimo/_utils/narwhals_utils.py | 1 - pyproject.toml | 4 ++-- tests/_runtime/test_manage_script_metadata.py | 1 - 10 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 332e5b21de9..381cbce36da 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.15 hooks: # Run the linter - id: ruff-check diff --git a/marimo/_ai/_tools/tools/cells.py b/marimo/_ai/_tools/tools/cells.py index 33d4eb5c331..63702fc762a 100644 --- a/marimo/_ai/_tools/tools/cells.py +++ b/marimo/_ai/_tools/tools/cells.py @@ -24,7 +24,6 @@ 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 f97c4c3cdee..9fef1a13a24 100644 --- a/marimo/_ast/app.py +++ b/marimo/_ast/app.py @@ -66,7 +66,6 @@ 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 e421ee3f064..43d9fbe379d 100644 --- a/marimo/_lint/linter.py +++ b/marimo/_lint/linter.py @@ -3,7 +3,6 @@ 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 62f3eb21491..175fa251462 100644 --- a/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py +++ b/marimo/_plugins/ui/_impl/dataframes/transforms/handlers.py @@ -3,7 +3,6 @@ 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 23b9bac746d..78db3bd3871 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 @@ ) if TYPE_CHECKING: - from collections.abc import Mapping + from collections.abc import Callable, Mapping from narwhals.typing import IntoDataFrame @@ -78,7 +77,7 @@ ) 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 97af4a57b69..3b73ceacf01 100644 --- a/marimo/_runtime/complete.py +++ b/marimo/_runtime/complete.py @@ -5,7 +5,6 @@ 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 9b0f85d434b..885fff3dbb4 100644 --- a/marimo/_utils/narwhals_utils.py +++ b/marimo/_utils/narwhals_utils.py @@ -10,7 +10,6 @@ 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 8f73c28d8af..c346bfe3d2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -140,7 +140,7 @@ dev = [ # Stubs for optional dataframe backends "pyarrow-stubs", # For linting - "ruff>=0.15.9", + "ruff>=0.15.15", # For AI "pydantic-ai-slim[openai]>=1.84.0", ] @@ -263,7 +263,7 @@ typecheck = [ docs = [ "marimo_docs", - "ruff>=0.15.9", + "ruff>=0.15.15", "mkdocs>=1.6.1", # Live reloading broken in >= 9.6.21: https://github.com/squidfunk/mkdocs-material/issues/8478 "mkdocs-material==9.6.20", diff --git a/tests/_runtime/test_manage_script_metadata.py b/tests/_runtime/test_manage_script_metadata.py index ae00199ac5b..3eebba93cf7 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