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: remove side-effectful isinstance check (#1779)
Akshay Agrawal139b0a018175
diff --git a/marimo/_plugins/ui/_impl/tables/types.py b/marimo/_plugins/ui/_impl/tables/types.pyindex f3c97b07bf..1af73d6383 100644--- a/marimo/_plugins/ui/_impl/tables/types.py+++ b/marimo/_plugins/ui/_impl/tables/types.py@@ -1,12 +1,11 @@# Copyright 2024 Marimo. All rights reserved.from __future__ import annotations-from typing import Protocol, runtime_checkable+from typing import Protocolfrom marimo._plugins.ui._impl.tables.dataframe_protocol import DataFrame-@runtime_checkableclass DataFrameLike(Protocol):def __dataframe__(self, nan_as_null: bool = False, allow_copy: bool = True@@ -15,8 +14,7 @@ class DataFrameLike(Protocol):def is_dataframe_like(value: object) -> bool:return (- isinstance(value, DataFrameLike)- and hasattr(value, "__dataframe__")+ hasattr(value, "__dataframe__")and callable(value.__dataframe__)# By checking these are equal, we likely guarding against# __getattr__ implementations that may return different callables