From 03c7d1f199af35972f9fbfba52ef907cede33b0b Mon Sep 17 00:00:00 2001 From: alexcastgonz <82875882+pcbeingused333@users.noreply.github.com> Date: Thu, 29 Oct 2026 16:03:32 -0400 Subject: [PATCH] fix(python): add the missing f prefix to the permutation split error (#4709) --- python/python/lancedb/permutation.py | 2 +- python/python/tests/test_permutation.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/python/python/lancedb/permutation.py b/python/python/lancedb/permutation.py index 0788cb5cb..b70c96979 100644 --- a/python/python/lancedb/permutation.py +++ b/python/python/lancedb/permutation.py @@ -641,7 +641,7 @@ class Permutation: if split is not None: if permutation_table is None: raise ValueError( - "Cannot create a permutation on split `{split}`" + f"Cannot create a permutation on split `{split}`" " because no permutation table is provided" ) if isinstance(split, str): diff --git a/python/python/tests/test_permutation.py b/python/python/tests/test_permutation.py index 50ca53061..bc5c1649c 100644 --- a/python/python/tests/test_permutation.py +++ b/python/python/tests/test_permutation.py @@ -1404,3 +1404,10 @@ def test_permutation_over_remote_table(): ] assert_server_safe_row_id_requests(server) + + +def test_from_tables_split_without_permutation_table(mem_db): + tbl = mem_db.create_table("test_table", pa.table({"id": range(10)})) + + with pytest.raises(ValueError, match="permutation on split `train` because no"): + Permutation.from_tables(tbl, split="train")