From b95fe4c4ad0e670e5950035f9438e1c3371f4a1d Mon Sep 17 00:00:00 2001 From: Oliver Baer <75138893+mrwind-up-bird@users.noreply.github.com> Date: Thu, 26 Feb 2026 15:18:17 +0100 Subject: [PATCH] fix(autofix): Magic numbers in chunking configuration --- app/services/chunking.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/services/chunking.py b/app/services/chunking.py index bb3d84e..ccf3dea 100644 --- a/app/services/chunking.py +++ b/app/services/chunking.py @@ -5,6 +5,11 @@ import re import unicodedata from dataclasses import dataclass +# Default chunking configuration constants +DEFAULT_CHUNK_SIZE = 512 +DEFAULT_CHUNK_OVERLAP = 64 + + @dataclass @@ -42,8 +47,8 @@ def normalize_text(text: str) -> str: " ", # word boundaries "", # character-level fallback ] - - + chunk_size: int = DEFAULT_CHUNK_SIZE, + chunk_overlap: int = DEFAULT_CHUNK_OVERLAP, def chunk_text( text: str, chunk_size: int = 512,