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.

fix: make sample_values an Any (#3040)

Myles Scolnickd030aa1fbcb0
diff --git a/marimo/_data/models.py b/marimo/_data/models.py
index 8dc08ae390..aedb75300f 100644
--- a/marimo/_data/models.py
+++ b/marimo/_data/models.py
@@ -4,7 +4,7 @@ from __future__ import annotations
from dataclasses import dataclass
from datetime import date, datetime, time, timedelta # noqa: TCH003
from decimal import Decimal
-from typing import List, Literal, Optional, Union
+from typing import Any, List, Literal, Optional, Union
DataType = Literal[
"string",
@@ -34,7 +34,7 @@ class DataTableColumn:
name: str
type: DataType
external_type: ExternalDataType
- sample_values: List[str]
+ sample_values: List[Any]
DataTableSource = Literal["local", "duckdb"]
diff --git a/marimo/_server/models/completion.py b/marimo/_server/models/completion.py
index 69f7fcf2e7..fff3eb4a32 100644
--- a/marimo/_server/models/completion.py
+++ b/marimo/_server/models/completion.py
@@ -2,7 +2,7 @@
from __future__ import annotations
from dataclasses import dataclass, field
-from typing import List, Literal, Optional
+from typing import Any, List, Literal, Optional
from marimo._ai.types import ChatMessage
@@ -11,7 +11,7 @@ from marimo._ai.types import ChatMessage
class SchemaColumn:
name: str
type: str
- sample_values: List[str]
+ sample_values: List[Any]
@dataclass
diff --git a/openapi/api.yaml b/openapi/api.yaml
index 69ee70a466..fb673ab546 100644
--- a/openapi/api.yaml
+++ b/openapi/api.yaml
@@ -23,8 +23,7 @@ components:
name:
type: string
sampleValues:
- items:
- type: string
+ items: {}
type: array
type:
type: string
@@ -427,8 +426,7 @@ components:
name:
type: string
sample_values:
- items:
- type: string
+ items: {}
type: array
type:
$ref: '#/components/schemas/DataType'
diff --git a/openapi/src/api.ts b/openapi/src/api.ts
index 968e2a8b8a..a76aba73e3 100644
--- a/openapi/src/api.ts
+++ b/openapi/src/api.ts
@@ -2005,7 +2005,7 @@ export interface components {
schema: {
columns: {
name: string;
- sampleValues: string[];
+ sampleValues: unknown[];
type: string;
}[];
name: string;
@@ -2163,7 +2163,7 @@ export interface components {
DataTableColumn: {
external_type: string;
name: string;
- sample_values: string[];
+ sample_values: unknown[];
type: components["schemas"]["DataType"];
};
/** @enum {string} */