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.

[pre-commit.ci] pre-commit autoupdate (#5793)

pre-commit-ci[bot]b8bf23166d30
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index ea9a59ab5e..ab4794e2de 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -31,7 +31,7 @@ repos:
pass_filenames: false
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: v0.12.3
+ rev: v0.12.5
hooks:
# Run the linter
- id: ruff
@@ -40,7 +40,7 @@ repos:
- id: ruff-format
- repo: https://github.com/biomejs/pre-commit
- rev: v2.1.1
+ rev: v2.1.2
hooks:
- id: biome-check
args: [--config-path, biome.jsonc, --diagnostic-level, warn]
diff --git a/marimo/_cli/cli.py b/marimo/_cli/cli.py
index 0f6b2deb04..9fa60e4794 100644
--- a/marimo/_cli/cli.py
+++ b/marimo/_cli/cli.py
@@ -643,7 +643,7 @@ def new(
try:
_maybe_path = Path(prompt)
if _maybe_path.is_file():
- prompt = _maybe_path.read_text()
+ prompt = _maybe_path.read_text(encoding="utf-8")
except OSError:
# is_file() fails when, for example, the "filename" (prompt) is too long
pass
diff --git a/marimo/_output/md.py b/marimo/_output/md.py
index 4eb382e753..21e4ddff25 100644
--- a/marimo/_output/md.py
+++ b/marimo/_output/md.py
@@ -344,7 +344,7 @@ def latex(*, filename: Union[str, Path]) -> None:
with urlopen(filename) as response:
text = response.read().decode("utf-8")
elif (file := Path(filename)).exists():
- text = file.read_text()
+ text = file.read_text(encoding="utf-8")
else:
raise ValueError(f"Invalid filename: {filename}")
diff --git a/marimo/_server/files/os_file_system.py b/marimo/_server/files/os_file_system.py
index c7064a56ca..98142bf640 100644
--- a/marimo/_server/files/os_file_system.py
+++ b/marimo/_server/files/os_file_system.py
@@ -181,7 +181,7 @@ class OSFileSystem(FileSystem):
def update_file(self, path: str, contents: str) -> FileInfo:
file_path = Path(path)
- file_path.write_text(contents)
+ file_path.write_text(contents, encoding="utf-8")
return self.get_details(path, contents=contents).file
def open_in_editor(self, path: str) -> bool: