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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
fix: type opaque Python introspection inputs (#11513)
Shahmir Varqha98ada291d9a2
diff --git a/marimo/_utils/methods.py b/marimo/_utils/methods.pyindex 58bada1ca0..bba73df468 100644--- a/marimo/_utils/methods.py+++ b/marimo/_utils/methods.py@@ -7,7 +7,7 @@ from collections.abc import Callablefrom typing import Any, cast-def is_callable_method(obj: Any, attr: str) -> bool:+def is_callable_method(obj: object, attr: str) -> bool:"""Check if an attribute is a real callable method on an object.Uses `inspect.getattr_static` so that attributes synthesized bydiff --git a/marimo/_utils/variable_name.py b/marimo/_utils/variable_name.pyindex 42be9e5bfc..91b3cb5e32 100644--- a/marimo/_utils/variable_name.py+++ b/marimo/_utils/variable_name.py@@ -2,14 +2,13 @@from __future__ import annotationsimport inspect-from typing import Anyfrom marimo import _loggersLOGGER = _loggers.marimo_logger()-def infer_variable_name(value: Any, fallback: str) -> str:+def infer_variable_name(value: object, fallback: str) -> str:"""Infer the variable name that holds `value` in the caller's caller.Walks up two frames (skipping this helper and the direct caller) anddiff --git a/marimo/_utils/with_skip.py b/marimo/_utils/with_skip.pyindex 2a9a58e37a..40772328b9 100644--- a/marimo/_utils/with_skip.py+++ b/marimo/_utils/with_skip.py@@ -4,7 +4,7 @@ from __future__ import annotationsimport inspectimport sysfrom abc import ABC, abstractmethod-from typing import TYPE_CHECKING, Any, NoReturn+from typing import TYPE_CHECKING, NoReturnif TYPE_CHECKING:from types import FrameType@@ -39,7 +39,7 @@ class SkipContext(ABC):return selfdef _trace_wrapper(- self, frame: FrameType, event: str, arg: Any+ self, frame: FrameType, event: str, arg: object) -> TraceFunction | None:"""Wrapper function that ensures we do not break existing traces (e.g., code coverage)."""result = None@@ -55,7 +55,7 @@ class SkipContext(ABC):raise SkipWithBlock()def _trace(- self, with_frame: FrameType, _event: str, _arg: Any+ self, with_frame: FrameType, _event: str, _arg: object) -> TraceFunction | None:self._entered_trace = True