sample_id
stringlengths
21
196
text
stringlengths
105
936k
metadata
dict
category
stringclasses
6 values
marimo-team/marimo:marimo/_runtime/dataflow/edges.py
# Copyright 2026 Marimo. All rights reserved. """Edge computation logic for cell dependencies.""" from __future__ import annotations from typing import TYPE_CHECKING, Literal, Optional, cast from marimo import _loggers if TYPE_CHECKING: from marimo._ast.cell import CellImpl from marimo._ast.sql_visitor impo...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_runtime/dataflow/edges.py", "license": "Apache License 2.0", "lines": 216, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_runtime/dataflow/graph.py
# Copyright 2026 Marimo. All rights reserved. """Graph coordinator that orchestrates all dataflow components.""" from __future__ import annotations import threading from dataclasses import dataclass, field from typing import TYPE_CHECKING, Callable, Literal, Optional from marimo import _loggers from marimo._ast.comp...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_runtime/dataflow/graph.py", "license": "Apache License 2.0", "lines": 344, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_runtime/dataflow/runner.py
# Copyright 2026 Marimo. All rights reserved. """Runner utility for executing individual cells in a graph.""" from __future__ import annotations from typing import TYPE_CHECKING, Any from marimo._runtime.executor import ExecutionConfig, get_executor if TYPE_CHECKING: from marimo._ast.cell import CellImpl fr...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_runtime/dataflow/runner.py", "license": "Apache License 2.0", "lines": 125, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_runtime/dataflow/topology.py
# Copyright 2026 Marimo. All rights reserved. """Graph topology for cell dependencies. This module provides the core graph structure for tracking cell relationships. """ from __future__ import annotations from collections import deque from dataclasses import dataclass, field from typing import TYPE_CHECKING, Protoco...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_runtime/dataflow/topology.py", "license": "Apache License 2.0", "lines": 110, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_runtime/dataflow/types.py
# Copyright 2026 Marimo. All rights reserved. """Type definitions for dataflow graph.""" from __future__ import annotations from marimo._types.ids import CellId_t # Edge is a tuple of (parent, child) cell IDs Edge = tuple[CellId_t, CellId_t] # EdgeWithVar uses a tuple (not a set) for the variables linking the cells...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_runtime/dataflow/types.py", "license": "Apache License 2.0", "lines": 12, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_runtime/test_edges.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from functools import partial import pytest from marimo._ast import compiler from marimo._dependencies.dependencies import DependencyManager from marimo._runtime.dataflow import edges from marimo._runtime.dataflow.definitions import Def...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_runtime/test_edges.py", "license": "Apache License 2.0", "lines": 435, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_runtime/test_topology.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from functools import partial import pytest from marimo._ast import compiler from marimo._runtime.dataflow.topology import MutableGraphTopology from marimo._types.ids import CellId_t parse_cell = partial(compiler.compile_cell, cell_id=...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_runtime/test_topology.py", "license": "Apache License 2.0", "lines": 355, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/issues/2628_bar_container.py
import marimo __generated_with = "0.18.4" app = marimo.App(width="medium") @app.cell def _(): import matplotlib.pyplot as plt return (plt,) @app.cell def _(plt): import numpy as np plt.hist(np.random.rand(1000), bins=10) return @app.cell def _(): import altair as alt chart = ( ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/issues/2628_bar_container.py", "license": "Apache License 2.0", "lines": 31, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/outputs/console_with_links.py
import marimo __generated_with = "0.18.4" app = marimo.App(width="medium") @app.cell def _(): import altair as alt import polars as pl import vegafusion # Enable VegaFusion data transformer alt.data_transformers.enable("vegafusion") _df = pl.DataFrame( {"category": ["A", "B", "C", "...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/outputs/console_with_links.py", "license": "Apache License 2.0", "lines": 75, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/anywidget_examples/scatter.py
# /// script # requires-python = ">=3.13" # dependencies = [ # "jupyter-scatter==0.22.2", # "numpy==2.3.5", # ] # /// import marimo __generated_with = "0.19.7" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo import jscatter import numpy as np x = np.random.rand(50000...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/anywidget_examples/scatter.py", "license": "Apache License 2.0", "lines": 31, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_plugins/stateless/test_stat.py
# Copyright 2026 Marimo. All rights reserved. import pytest from marimo._dependencies.dependencies import DependencyManager from marimo._output.hypertext import Html from marimo._plugins.stateless.stat import try_convert_to_html def test_try_convert_to_html_valid_html(): result = try_convert_to_html("<div>Hello...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_plugins/stateless/test_stat.py", "license": "Apache License 2.0", "lines": 29, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_ast/codegen_data/test_stacked_decorators_toplevel.py
import marimo __generated_with = "0.18.2" app = marimo.App() with app.setup: import marimo as mo wrap = lambda x: x @app.function # comment after app.function @mo.cache # comment after cache def cached_func(): return 42 @app.cell def normal_cell(): a = 1 return (a,) @app.class_definition @wr...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_ast/codegen_data/test_stacked_decorators_toplevel.py", "license": "Apache License 2.0", "lines": 26, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/tables/decimals.py
import marimo __generated_with = "0.18.2" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return @app.cell def _(): import polars as pl decimal_data = pl.DataFrame( {"decimals": pl.Series(range(201), dtype=pl.Decimal(scale=2))} ) decimal_data return @a...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/tables/decimals.py", "license": "Apache License 2.0", "lines": 26, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/nav_menu_submenu_positioning.py
import marimo __generated_with = "0.18.2" app = marimo.App(width="full") @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(mo): orientation = mo.ui.dropdown(["vertical", "horizontal"], value="horizontal") orientation return (orientation,) @app.cell(hide_code=True) def _(mo):...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/nav_menu_submenu_positioning.py", "license": "Apache License 2.0", "lines": 104, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:frontend/e2e-tests/py/layout_grid_with_sidebar.py
# /// script # [tool.marimo.runtime] # auto_instantiate = true # /// import marimo __generated_with = "0.18.0" app = marimo.App(layout_file="layouts/layout_grid_with_sidebar.grid.json") @app.cell def _(mo): mo.md(""" # Grid with Sidebar """) return @app.cell def _(mo): mo.md(""" ## Main Co...
{ "repo_id": "marimo-team/marimo", "file_path": "frontend/e2e-tests/py/layout_grid_with_sidebar.py", "license": "Apache License 2.0", "lines": 48, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_server/test_file_manager_absolute_path.py
# Copyright 2026 Marimo. All rights reserved. """Test file manager with absolute directory paths.""" from __future__ import annotations import os import sys from pathlib import Path import pytest from marimo._server.file_router import AppFileRouter from marimo._utils.http import HTTPException, HTTPStatus is_window...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_server/test_file_manager_absolute_path.py", "license": "Apache License 2.0", "lines": 666, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_ai/test_streaming_config.py
# Copyright 2026 Marimo. All rights reserved. """Tests for streaming delta generation and fallback behavior.""" from __future__ import annotations from marimo._ai.llm._impl import openai class TestStreamingDeltaGeneration: """Test that stream response helpers yield delta chunks.""" def test_openai_stream_r...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_ai/test_streaming_config.py", "license": "Apache License 2.0", "lines": 116, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/tables/markdown_example.py
import marimo __generated_with = "0.17.8" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(markdown_sample, mo): mo.ui.table( { "heading": ["### Hello" * 8], "code_blocks": ["```python\n print('hi')\n```" * 3], ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/tables/markdown_example.py", "license": "Apache License 2.0", "lines": 37, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_lint/rules/runtime/branch_expression.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import ast from typing import TYPE_CHECKING from marimo._ast.parse import ast_parse from marimo._lint.diagnostic import Diagnostic, Severity from marimo._lint.rules.base import LintRule if TYPE_CHECKING: from marimo._lint.context im...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_lint/rules/runtime/branch_expression.py", "license": "Apache License 2.0", "lines": 220, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:tests/_lint/test_files/branch_expression.py
import marimo __generated_with = "0.18.0" app = marimo.App(width="medium") with app.setup: import marimo as mo @app.cell def _(): # Standard branch x = input("What's your name?") # prefer mo.ui.input in real cases :) if len(x) > 20: invalid = True mo.md("Your name is very long.") ...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_files/branch_expression.py", "license": "Apache License 2.0", "lines": 96, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_messaging/test_enc_hook.py
# Copyright 2026 Marimo. All rights reserved. import decimal import json import pytest from marimo._dependencies.dependencies import DependencyManager from marimo._messaging.msgspec_encoder import enc_hook def test_enc_hook() -> None: """Test the enc_hook function.""" assert enc_hook(1) == 1 assert enc...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_messaging/test_enc_hook.py", "license": "Apache License 2.0", "lines": 87, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/parse/classes_with_types.py
import marimo __generated_with = "0.18.0" app = marimo.App(width="medium") with app.setup: from typing import TypeAlias MySetupTypeAlias: TypeAlias = int type MySetupType = int @app.class_definition class SetupTypeAlias: def __init__(self, value: MySetupTypeAlias): self.value = value @app...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/parse/classes_with_types.py", "license": "Apache License 2.0", "lines": 27, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/tables/nans.py
import marimo __generated_with = "0.18.2" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo import polars as pl import pandas as pd import numpy as np return mo, np, pd, pl @app.cell def _(mo, np, pl): polars_df = pl.DataFrame({"nans": [1.0, np.nan, np.inf, -np.inf, No...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/tables/nans.py", "license": "Apache License 2.0", "lines": 37, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/parse/classes.py
import marimo __generated_with = "0.18.0" app = marimo.App(width="medium") @app.class_definition # This should be reusable class One: A: int = 1 def run(a: A = 1) -> int: return a @app.class_definition # This should be a pure-class class Two: A: int = 1 def run(a: int = 1) -> int: ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/parse/classes.py", "license": "Apache License 2.0", "lines": 51, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/tables/milliseconds.py
import marimo __generated_with = "0.18.0" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(): import pandas as pd base = pd.Timestamp("2024-11-21T12:34:56") data = { "timestamp": [ base, base + pd.Timedelta(mil...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/tables/milliseconds.py", "license": "Apache License 2.0", "lines": 63, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/compat/python314.py
import marimo __generated_with = "0.18.0" app = marimo.App(width="medium") @app.cell def _(): import asyncio import concurrent.futures def blocking(): return "done" return asyncio, blocking, concurrent @app.cell async def _(asyncio, blocking, concurrent): loop = asyncio.get_running_loo...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/compat/python314.py", "license": "Apache License 2.0", "lines": 18, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/this.py
# Copyright 2026 Marimo. All rights reserved. print("""The marimo contract To use marimo means entering into a social contract. In this contract you agree to define each variable just once, to reference variables without cycles, to mutate variables sparingly, to bind variables to UI elements. In return marimo assembl...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/this.py", "license": "Apache License 2.0", "lines": 30, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
documentation
marimo-team/marimo:examples/ai/chat/streaming_custom.py
# /// script # requires-python = ">=3.11" # dependencies = [ # "marimo", # ] # /// import marimo __generated_with = "0.19.7" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo import asyncio return asyncio, mo @app.cell(hide_code=True) def _(mo): mo.md(""" # Custom st...
{ "repo_id": "marimo-team/marimo", "file_path": "examples/ai/chat/streaming_custom.py", "license": "Apache License 2.0", "lines": 79, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_runtime/utils/test_set_ui_element_request_manager.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import asyncio import queue import threading import time from marimo._runtime.commands import ( ModelCommand, ModelCustomMessage, ModelUpdateMessage, UpdateUIElementCommand, ) from marimo._runtime.utils.set_ui_element_req...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_runtime/utils/test_set_ui_element_request_manager.py", "license": "Apache License 2.0", "lines": 337, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/third_party/pymc_example.py
import marimo __generated_with = "0.17.7" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return @app.cell def _(): import pymc as pm import numpy as np import time # Define a simple model with pm.Model() as model: # Define a normal distribution ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/third_party/pymc_example.py", "license": "Apache License 2.0", "lines": 25, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/formatters/ibis_opinionated_formatters.py
# /// script # requires-python = ">=3.13" # dependencies = [ # "ibis-framework[duckdb]==11.0.0", # ] # /// import marimo __generated_with = "0.17.7" app = marimo.App(width="medium", auto_download=["html", "ipynb"]) @app.cell def _(): import ibis import marimo as mo return ibis, mo @app.cell def _(...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/formatters/ibis_opinionated_formatters.py", "license": "Apache License 2.0", "lines": 55, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_ast/codegen_data/test_function_decorator_call.py
import marimo __generated_with = "0.15.3" app = marimo.App() with app.setup(): def my_decorator(fn): return fn @app.function() @my_decorator def my_function(): x = 1 return x if __name__ == "__main__": app.run()
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_ast/codegen_data/test_function_decorator_call.py", "license": "Apache License 2.0", "lines": 13, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/markdown/caret.py
import marimo __generated_with = "0.17.7" app = marimo.App(width="medium") @app.cell def _(mo): mo.md(r""" ## Superscript H^2^O E = mc^2^ x^2^ + y^2^ = z^2^ This is text^with\ superscript^ in the middle. """) return @app.cell def _(mo): mo.md(r""" ## Insert (underline) ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/markdown/caret.py", "license": "Apache License 2.0", "lines": 38, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
documentation
marimo-team/marimo:frontend/test_retina.py
import marimo __generated_with = "0.17.7" app = marimo.App(width="medium") @app.cell def _(): return @app.cell def _(): import marimo as mo import matplotlib.pyplot as plt import numpy as np return np, plt @app.cell def _(np, plt): # Test from the original issue x = np.random.rand(27)...
{ "repo_id": "marimo-team/marimo", "file_path": "frontend/test_retina.py", "license": "Apache License 2.0", "lines": 35, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/supabase_example.py
# /// script # requires-python = ">=3.13" # dependencies = [ # "polars==1.35.1", # "psycopg2-binary==2.9.11", # "sqlalchemy==2.0.44", # "supabase==2.23.2", # ] # /// import marimo __generated_with = "0.17.6" app = marimo.App(width="medium") with app.setup: import marimo as mo import polars as...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/supabase_example.py", "license": "Apache License 2.0", "lines": 64, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_sql/connection_utils.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from marimo._data.models import DataSourceConnection, DataTable from marimo._messaging.notification import SQLMetadata def update_table_in_connection( connections: list[DataSourceConnection], sql_metadata: SQLMetadata, updat...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_sql/connection_utils.py", "license": "Apache License 2.0", "lines": 50, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:tests/_sql/test_connection_utils.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import time from typing import Callable import pytest from marimo._data.models import ( Database, DataSourceConnection, DataTable, DataTableColumn, Schema, ) from marimo._messaging.notification import SQLMetadata fro...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_sql/test_connection_utils.py", "license": "Apache License 2.0", "lines": 396, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_ast/codegen_data/_test_parse_error_in_notebook.py
import marimo __generated_with = "0.17.4" app = marimo.App(width="medium") @app.cell def _(mo): mo.md(""" r"""Markdown cell with error""" """) return @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(): return if __name__ == "__main__": app.run()
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_ast/codegen_data/_test_parse_error_in_notebook.py", "license": "Apache License 2.0", "lines": 18, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/markdown/rerendering_latex.py
import marimo __generated_with = "0.17.4" app = marimo.App(width="medium") @app.cell def _(): return @app.cell def _(mo): a=mo.ui.table({"a":[1,2,3]},selection="single",initial_selection=[0]) a return (a,) @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(a, mo): m...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/markdown/rerendering_latex.py", "license": "Apache License 2.0", "lines": 22, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_mcp/server/_prompts/prompts/errors.py
# Copyright 2026 Marimo. All rights reserved. """MCP Prompts for notebook error information.""" from __future__ import annotations from typing import TYPE_CHECKING from marimo._mcp.server._prompts.base import PromptBase if TYPE_CHECKING: from mcp.types import PromptMessage class ErrorsSummary(PromptBase): ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_mcp/server/_prompts/prompts/errors.py", "license": "Apache License 2.0", "lines": 68, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_mcp/server/prompts/test_errors_prompts.py
import pytest pytest.importorskip("mcp", reason="MCP requires Python 3.10+") from unittest.mock import Mock from marimo._ai._tools.types import ( MarimoCellErrors, MarimoErrorDetail, MarimoNotebookInfo, ) from marimo._mcp.server._prompts.prompts.errors import ErrorsSummary from marimo._types.ids import C...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_mcp/server/prompts/test_errors_prompts.py", "license": "Apache License 2.0", "lines": 59, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_lint/rules/formatting/markdown_dedent.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from typing import TYPE_CHECKING from marimo._ast.codegen import format_markdown from marimo._lint.diagnostic import Diagnostic, Severity from marimo._lint.rules.base import LintRule if TYPE_CHECKING: from marimo._lint.context impor...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_lint/rules/formatting/markdown_dedent.py", "license": "Apache License 2.0", "lines": 100, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_smoke_tests/cache_kwargs.py
import marimo __generated_with = "0.15.5" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(): kw = {"some_kw_arg": 30} some_arg1 = 1 return (kw,) @app.cell def _(): 1 return @app.cell def _(mo): class C: @mo.persistent_...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/cache_kwargs.py", "license": "Apache License 2.0", "lines": 39, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_lint/test_files/markdown_dedent.py
import marimo __generated_with = "0.17.0" app = marimo.App() @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(mo): mo.md( r""" # Test Markdown Already indented text. """ ) return @app.cell def _(mo): # With a comment # and another mo.md( ...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_files/markdown_dedent.py", "license": "Apache License 2.0", "lines": 66, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_lint/test_markdown_dedent.py
# Copyright 2026 Marimo. All rights reserved. """Tests for markdown dedent lint rule.""" from marimo._ast.parse import parse_notebook from tests._lint.utils import lint_notebook def test_markdown_dedent_detection(): """Test that markdown dedent rule detects indented markdown.""" file = "tests/_lint/test_file...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_markdown_dedent.py", "license": "Apache License 2.0", "lines": 68, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/altair_examples/binning.py
# /// script # requires-python = ">=3.11" # dependencies = [ # "marimo", # "pandas", # "numpy", # "vega-datasets", # "altair", # "pyarrow==22.0.0", # "polars==1.34.0", # ] # /// import marimo __generated_with = "0.17.2" app = marimo.App(width="medium") @app.cell(hide_code=True) def _(): ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/altair_examples/binning.py", "license": "Apache License 2.0", "lines": 300, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_smoke_tests/tables/column-header-chart.py
# /// script # requires-python = ">=3.13" # dependencies = [ # "polars==1.34.0", # "requests==2.32.5", # ] # /// import marimo __generated_with = "0.17.0" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo import polars as pl return (pl,) @app.cell def _(pl): # Enums a...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/tables/column-header-chart.py", "license": "Apache License 2.0", "lines": 56, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/altair_examples/upset.py
# /// script # requires-python = ">=3.13" # dependencies = [ # "altair-upset==0.4.0", # "pandas==2.3.2", # "pyarrow==22.0.0", # ] # /// import marimo __generated_with = "0.17.2" app = marimo.App(width="medium", sql_output="polars") @app.cell def _(): import marimo as mo import pandas as pd i...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/altair_examples/upset.py", "license": "Apache License 2.0", "lines": 36, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/altair_examples/hconcat_vconcat.py
import marimo __generated_with = "0.16.2" app = marimo.App(width="full") @app.cell def _(): from vega_datasets import data import altair as alt import marimo as mo cars = data.cars() _chart = ( alt.Chart(cars) .mark_point() .encode( x="Horsepower", ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/altair_examples/hconcat_vconcat.py", "license": "Apache License 2.0", "lines": 177, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/altair_examples/composite_legend_selection.py
import marimo __generated_with = "0.17.2" app = marimo.App(width="medium") @app.cell def _(): import altair as alt import pandas as pd import marimo as mo return alt, mo, pd @app.cell(hide_code=True) def _(mo): mo.md( r""" ## Composite Chart Legend Selection Bug Test case for h...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/altair_examples/composite_legend_selection.py", "license": "Apache License 2.0", "lines": 217, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/altair_examples/special_chars.py
"""Test Altair chart builder with special characters in column names. This notebook tests the fix for issue #5956, which ensures that special characters like dots, brackets, and colons in column names are properly escaped when generating Altair chart code. """ import marimo __generated_with = "0.17.2" app = marimo.A...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/altair_examples/special_chars.py", "license": "Apache License 2.0", "lines": 76, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/altair_examples/tooltip_images.py
# /// script # requires-python = ">=3.11" # dependencies = [ # "pandas", # "altair", # "marimo", # ] # /// # Copyright 2026 Marimo. All rights reserved. import marimo __generated_with = "0.17.2" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return (mo,) @app.cell(hide...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/altair_examples/tooltip_images.py", "license": "Apache License 2.0", "lines": 175, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_ai/_tools/utils/output_cleaning.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import re def clean_output(lines: list[str]) -> list[str]: """Clean console output for LLM consumption.""" lines = normalize_progress_bars(lines) lines = deduplicate_lines(lines) lines = strip_ansi_codes(lines) line...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_ai/_tools/utils/output_cleaning.py", "license": "Apache License 2.0", "lines": 71, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:tests/_ai/tools/utils/test_output_cleaning.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from marimo._ai._tools.utils.output_cleaning import ( clean_output, deduplicate_lines, normalize_progress_bars, strip_ansi_codes, truncate_output, ) class TestStripAnsiCodes: def test_removes_color_codes(self) ->...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_ai/tools/utils/test_output_cleaning.py", "license": "Apache License 2.0", "lines": 159, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/sql/numpy_sql.py
import marimo __generated_with = "0.17.0" app = marimo.App(width="medium", sql_output="native") @app.cell def _(): import marimo as mo import pandas as pd import numpy as np import sqlglot import pyarrow return np, pd @app.cell def _(np, pd): example_df = pd.DataFrame( [ ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/sql/numpy_sql.py", "license": "Apache License 2.0", "lines": 33, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/altair_examples/column_facet.py
import marimo __generated_with = "0.17.0" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(): import altair as alt from vega_datasets import data source = data.barley() chart = ( alt.Chart(source) .mark_bar() .enco...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/altair_examples/column_facet.py", "license": "Apache License 2.0", "lines": 38, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_utils/env.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import os def env_to_value(key: str) -> tuple[str | None | list[str] | bool] | None: """Return a typed value from environment variables.""" if key in os.environ: value = os.environ[key] if value.lower() in ("true...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_utils/env.py", "license": "Apache License 2.0", "lines": 15, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_ai/_tools/tools/lint.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from dataclasses import dataclass, field from marimo._ai._tools.base import ToolBase from marimo._ai._tools.types import SuccessResult, ToolGuidelines from marimo._lint.diagnostic import Diagnostic, Severity from marimo._lint.rule_engine...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_ai/_tools/tools/lint.py", "license": "Apache License 2.0", "lines": 96, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_ai/tools/tools/test_lint_tool.py
from __future__ import annotations from dataclasses import dataclass from unittest.mock import AsyncMock, Mock from marimo._ai._tools.base import ToolContext from marimo._ai._tools.tools.lint import LintNotebook, LintNotebookArgs from marimo._lint.diagnostic import Diagnostic, Severity from marimo._schemas.serializat...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_ai/tools/tools/test_lint_tool.py", "license": "Apache License 2.0", "lines": 123, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/markdown/stacked.py
import marimo __generated_with = "0.17.0" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(mo): items = [ mo.md("# one"), mo.md("# two"), mo.md("## three"), mo.md("## four"), ] return (items,) @app.cell def _(...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/markdown/stacked.py", "license": "Apache License 2.0", "lines": 41, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_smoke_tests/sql/duckdb_interrupt.py
import marimo __generated_with = "0.16.5" app = marimo.App(width="medium") @app.cell def _(): FILE = "https://data.source.coop/cholmes/eurocrops/unprojected/geoparquet/FR_2018_EC21.parquet" return (FILE,) @app.cell def _(): import marimo as mo return (mo,) @app.cell def _(mo): _df = mo.sql( ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/sql/duckdb_interrupt.py", "license": "Apache License 2.0", "lines": 44, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_runtime/test_interrupt_handlers.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import signal from unittest.mock import MagicMock, patch import pytest from marimo._dependencies.dependencies import DependencyManager from marimo._runtime.context.types import ExecutionContext from marimo._runtime.handlers import const...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_runtime/test_interrupt_handlers.py", "license": "Apache License 2.0", "lines": 69, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/dataframes/transforms.py
# /// script # requires-python = "<=3.13" # dependencies = [ # "altair==5.5.0", # "dask==2025.9.1", # "duckdb==1.2.2", # "ibis-framework[duckdb]==10.8.0", # "marimo", # "pandas==2.3.3", # "polars", # ] # /// import marimo __generated_with = "0.16.5" app = marimo.App(width="medium") @app....
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/dataframes/transforms.py", "license": "Apache License 2.0", "lines": 69, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_plugins/ui/_impl/test_plotly.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from datetime import datetime, timedelta from typing import Any import pytest pytest.importorskip("plotly.express") pytest.importorskip("plotly.graph_objects") import plotly.express as px import plotly.graph_objects as go from marimo....
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_plugins/ui/_impl/test_plotly.py", "license": "Apache License 2.0", "lines": 1871, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_mcp/server/_prompts/base.py
# Copyright 2026 Marimo. All rights reserved. """Base class for MCP prompts.""" from __future__ import annotations from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Callable from marimo._utils.case import to_snake_case if TYPE_CHECKING: from mcp.types import PromptMessage from marimo._a...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_mcp/server/_prompts/base.py", "license": "Apache License 2.0", "lines": 56, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_mcp/server/_prompts/prompts/notebooks.py
# Copyright 2026 Marimo. All rights reserved. """MCP Prompts for notebook information.""" from __future__ import annotations from typing import TYPE_CHECKING from marimo._mcp.server._prompts.base import PromptBase if TYPE_CHECKING: from mcp.types import PromptMessage class ActiveNotebooks(PromptBase): """...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_mcp/server/_prompts/prompts/notebooks.py", "license": "Apache License 2.0", "lines": 56, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_mcp/server/_prompts/registry.py
# Copyright 2026 Marimo. All rights reserved. """Registry of all supported MCP prompts.""" from marimo._mcp.server._prompts.base import PromptBase from marimo._mcp.server._prompts.prompts.errors import ErrorsSummary from marimo._mcp.server._prompts.prompts.notebooks import ActiveNotebooks SUPPORTED_MCP_PROMPTS: list[...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_mcp/server/_prompts/registry.py", "license": "Apache License 2.0", "lines": 9, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_mcp/server/prompts/test_notebooks_prompts.py
import pytest pytest.importorskip("mcp", reason="MCP requires Python 3.10+") from unittest.mock import Mock from marimo._ai._tools.types import MarimoNotebookInfo from marimo._mcp.server._prompts.prompts.notebooks import ActiveNotebooks from marimo._types.ids import SessionId def test_active_notebooks_includes_ses...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_mcp/server/prompts/test_notebooks_prompts.py", "license": "Apache License 2.0", "lines": 33, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/third_party/holoviews_output_options.py
# /// script # requires-python = ">=3.12" # dependencies = [ # "holoviews==1.21.0", # "hvplot==0.12.1", # "netcdf4==1.7.2", # "pooch==1.8.2", # "xarray==2025.9.0", # ] # /// import marimo __generated_with = "0.15.2" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/third_party/holoviews_output_options.py", "license": "Apache License 2.0", "lines": 35, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_lint/test_files/mixed_issues.py
import marimo __generated_with = "0.16.5" app = marimo.App(width="medium") app._unparsable_cell( r""" This is a syntax error """, name="_" ) @app.cell def _(): # This is a blank cell return @app.cell def _(): a = 1 return app._unparsable_cell( r""" This is another syntax...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_files/mixed_issues.py", "license": "Apache License 2.0", "lines": 122, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_ai/_tools/tools/rules.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from dataclasses import dataclass from typing import Optional import marimo._utils.requests as requests from marimo import _loggers from marimo._ai._tools.base import ToolBase from marimo._ai._tools.types import EmptyArgs, SuccessResult,...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_ai/_tools/tools/rules.py", "license": "Apache License 2.0", "lines": 78, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_ai/tools/tools/test_rules.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from pathlib import Path from unittest.mock import Mock, patch import pytest from marimo._ai._tools.base import ToolContext from marimo._ai._tools.tools.rules import GetMarimoRules from marimo._ai._tools.types import EmptyArgs @pytes...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_ai/tools/tools/test_rules.py", "license": "Apache License 2.0", "lines": 116, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_mcp/server/test_mcp_server.py
# Copyright 2026 Marimo. All rights reserved. import pytest from marimo._mcp.server.lifespan import mcp_server_lifespan pytest.importorskip("mcp", reason="MCP requires Python 3.10+") from starlette.applications import Starlette from starlette.authentication import AuthCredentials, SimpleUser from starlette.middlewar...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_mcp/server/test_mcp_server.py", "license": "Apache License 2.0", "lines": 80, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_server/api/endpoints/cache.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from typing import TYPE_CHECKING from starlette.authentication import requires from marimo._runtime.commands import ClearCacheCommand, GetCacheInfoCommand from marimo._server.api.utils import dispatch_control_request from marimo._server...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_server/api/endpoints/cache.py", "license": "Apache License 2.0", "lines": 60, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
documentation
marimo-team/marimo:marimo/_save/stubs/function_stub.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import inspect import textwrap from typing import Any __all__ = ["FunctionStub"] class FunctionStub: """Stub for function objects, storing the source code.""" def __init__(self, function: Any) -> None: self.code = text...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_save/stubs/function_stub.py", "license": "Apache License 2.0", "lines": 19, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_save/stubs/module_stub.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import importlib from typing import Any __all__ = ["ModuleStub"] class ModuleStub: """Stub for module objects, storing only the module name.""" def __init__(self, module: Any) -> None: self.name = module.__name__ ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_save/stubs/module_stub.py", "license": "Apache License 2.0", "lines": 12, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_save/stubs/pydantic_stub.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from typing import Any from marimo._save.stubs.stubs import CustomStub __all__ = ["PydanticStub"] class PydanticStub(CustomStub): """Stub for pydantic BaseModel instances. Pydantic models have non-deterministic pickling due t...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_save/stubs/pydantic_stub.py", "license": "Apache License 2.0", "lines": 88, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_save/stubs/stubs.py
# Copyright 2026 Marimo. All rights reserved. """Lazy stub registration for cache serialization.""" from __future__ import annotations import abc from typing import Any __all__ = ["CustomStub", "CUSTOM_STUBS", "register_stub"] class CustomStub(abc.ABC): """Base class for custom stubs that can be registered in ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_save/stubs/stubs.py", "license": "Apache License 2.0", "lines": 55, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_save/stubs/ui_element_stub.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from typing import TYPE_CHECKING, Generic, TypeVar if TYPE_CHECKING: from marimo._plugins.ui._core.ui_element import UIElement __all__ = ["UIElementStub"] S = TypeVar("S") T = TypeVar("T") class UIElementStub(Generic[S, T]): ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_save/stubs/ui_element_stub.py", "license": "Apache License 2.0", "lines": 24, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_save/stubs/test_pydantic_stub.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import pytest pytest.importorskip("pydantic_core") from marimo._save.stubs.pydantic_stub import PydanticStub class TestPydanticStub: """Tests for PydanticStub serialization and deserialization.""" @staticmethod def test...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_save/stubs/test_pydantic_stub.py", "license": "Apache License 2.0", "lines": 152, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_save/stubs/test_stubs.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from typing import Any import pytest from marimo._save.stubs import ( CUSTOM_STUBS, STUB_REGISTRATIONS, CustomStub, maybe_register_stub, register_stub, ) class TestStubRegistration: """Tests for stub registrat...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_save/stubs/test_stubs.py", "license": "Apache License 2.0", "lines": 221, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_lint/rules/runtime/self_import.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import os from typing import TYPE_CHECKING from marimo._lint.diagnostic import Diagnostic, Severity from marimo._lint.rules.breaking.graph import GraphRule from marimo._utils.site_packages import ( has_local_conflict, ) if TYPE_CHEC...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_lint/rules/runtime/self_import.py", "license": "Apache License 2.0", "lines": 118, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_utils/site_packages.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import functools import os import pathlib import site from typing import Any @functools.cache def _getsitepackages() -> list[pathlib.Path]: try: # Try to get global site-packages (not available in virtual envs) site_...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_utils/site_packages.py", "license": "Apache License 2.0", "lines": 90, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:tests/_lint/test_files/module_shadow.py
import marimo __generated_with = "0.16.3" app = marimo.App() @app.cell def _(): import requests # Should trigger MR001 - file will be named requests.py importing requests return @app.cell def _(): # Test different import style from requests import get return if __name__ == "__main__": ap...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_files/module_shadow.py", "license": "Apache License 2.0", "lines": 14, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_lint/test_files/self_import_conflict.py
import marimo __generated_with = "0.16.3" app = marimo.App() @app.cell def _(): import pandas as pd # Should trigger MR001 if pandas exists in site-packages return @app.cell def _(): # Test that we can still define functions def my_function(): return "pandas specific logic" return if...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_files/self_import_conflict.py", "license": "Apache License 2.0", "lines": 15, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_lint/test_files/test_transitive_site_import.py
import marimo __generated_with = "0.16.3" app = marimo.App() @app.cell def _(): import pandas as pd # Should trigger MR001 - conflicts with pandas in site-packages return @app.cell def _(): # Test a different import style from pandas import DataFrame return if __name__ == "__main__": app...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_files/test_transitive_site_import.py", "license": "Apache License 2.0", "lines": 14, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:tests/_utils/test_site_packages.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import pathlib import site from unittest.mock import Mock from marimo._utils.site_packages import ( has_local_conflict, is_local_module, module_exists_in_site_packages, ) def test_is_local_module() -> None: """Test is_l...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_utils/test_site_packages.py", "license": "Apache License 2.0", "lines": 78, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_server/api/endpoints/mpl.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import asyncio from functools import wraps from pathlib import Path from typing import TYPE_CHECKING, Any, Callable, Optional import websockets if TYPE_CHECKING: from collections.abc import Awaitable from starlette.requests imp...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_server/api/endpoints/mpl.py", "license": "Apache License 2.0", "lines": 246, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:tests/_cli/test_endpoint.py
import contextlib import http.server import os import socket import socketserver import subprocess import threading import time import urllib.error from typing import Any from urllib.request import Request, urlopen import pytest def _get_free_port() -> int: with contextlib.closing( socket.socket(socket.A...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_cli/test_endpoint.py", "license": "Apache License 2.0", "lines": 138, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_server/ai/mcp/config.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING from marimo import _loggers from marimo._server.ai.mcp.transport import MCPTransportType if TYPE_CHECKING: from marimo._config.config import ( MCPConfig, ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_server/ai/mcp/config.py", "license": "Apache License 2.0", "lines": 154, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_server/ai/mcp/transport.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import os from abc import ABC, abstractmethod from enum import Enum from typing import TYPE_CHECKING, cast if TYPE_CHECKING: from contextlib import AsyncExitStack from marimo._config.config import ( MCPServerStdioConfig,...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_server/ai/mcp/transport.py", "license": "Apache License 2.0", "lines": 98, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:marimo/_server/ai/mcp/types.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from typing import TYPE_CHECKING, Any, Optional if TYPE_CHECKING: from typing import Union from anyio.streams.memory import ( MemoryObjectReceiveStream, MemoryObjectSendStream, ) from mcp.shared.message ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_server/ai/mcp/types.py", "license": "Apache License 2.0", "lines": 17, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_lint/formatters/base.py
# Copyright 2026 Marimo. All rights reserved. """Base formatter interface.""" from __future__ import annotations from abc import ABC, abstractmethod from typing import TYPE_CHECKING if TYPE_CHECKING: from marimo._lint.diagnostic import Diagnostic class DiagnosticFormatter(ABC): """Abstract base class for f...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_lint/formatters/base.py", "license": "Apache License 2.0", "lines": 18, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_lint/formatters/json.py
# Copyright 2026 Marimo. All rights reserved. """JSON formatter and types for lint output.""" from __future__ import annotations import json from typing import TYPE_CHECKING, Literal, TypedDict, Union from marimo._lint.formatters.base import DiagnosticFormatter from marimo._types.ids import CellId_t if TYPE_CHECKIN...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_lint/formatters/json.py", "license": "Apache License 2.0", "lines": 82, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex
marimo-team/marimo:tests/_lint/test_json_formatter.py
# Copyright 2026 Marimo. All rights reserved. """Unit tests for the JSON formatter.""" import json from pathlib import Path from marimo._lint import run_check from marimo._lint.diagnostic import Diagnostic, Severity from marimo._lint.formatters import JSONFormatter class TestJSONFormatter: """Test the JSONForma...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_lint/test_json_formatter.py", "license": "Apache License 2.0", "lines": 329, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/formatters/inspect_things.py
import marimo __generated_with = "0.16.2" app = marimo.App(width="medium") @app.cell def _(): import marimo as mo import numpy as np import functools return functools, mo, np @app.cell def _(mo): mo.inspect(mo, value=False) return @app.cell def _(mo, np): mo.inspect(np) return @...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/formatters/inspect_things.py", "license": "Apache License 2.0", "lines": 83, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_utils/msgspec_basestruct.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations from typing import TYPE_CHECKING, Any import msgspec if TYPE_CHECKING: from pydantic import GetCoreSchemaHandler from pydantic_core import CoreSchema class BaseStruct(msgspec.Struct): @classmethod def __get_pydantic_co...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_utils/msgspec_basestruct.py", "license": "Apache License 2.0", "lines": 46, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:tests/_utils/test_msgspec_basestruct.py
import typing as t import msgspec from marimo._ai._tools.tools.cells import ( GetCellOutputArgs, GetCellOutputOutput, GetCellRuntimeDataArgs, GetCellRuntimeDataOutput, GetLightweightCellMapArgs, GetLightweightCellMapOutput, ) from marimo._ai._tools.tools.datasource import ( GetDatabaseTabl...
{ "repo_id": "marimo-team/marimo", "file_path": "tests/_utils/test_msgspec_basestruct.py", "license": "Apache License 2.0", "lines": 92, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
test
marimo-team/marimo:marimo/_smoke_tests/sql/parse_errors.py
import marimo __generated_with = "0.16.2" app = marimo.App(width="medium") @app.cell def _(): import duckdb import marimo as mo import json JSON_SERIALIZE_QUERY = "SELECT JSON_SERIALIZE_SQL(?, skip_null := true, skip_empty := true, skip_default := true, format := true)" def parse(query): ...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_smoke_tests/sql/parse_errors.py", "license": "Apache License 2.0", "lines": 40, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_simple
marimo-team/marimo:marimo/_sql/parse.py
# Copyright 2026 Marimo. All rights reserved. from __future__ import annotations import re from typing import Any, Callable, Literal, Optional, Union import msgspec from marimo import _loggers from marimo._dependencies.dependencies import DependencyManager LOGGER = _loggers.marimo_logger() class SqlParseError(msg...
{ "repo_id": "marimo-team/marimo", "file_path": "marimo/_sql/parse.py", "license": "Apache License 2.0", "lines": 209, "canary_id": -1, "canary_value": "", "pii_type": "", "provider": "", "regex_pattern": "", "repetition": -1, "template": "" }
function_complex