From 45bf57d936787ecbf2aac0ab10b18be7fd9d24e8 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Tue, 22 Sep 2026 20:26:28 +0800 Subject: [PATCH] fix: enlarge the boundary of liquid range literal to system value --- src/metaglot/hack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/metaglot/hack.py b/src/metaglot/hack.py index c9f1472..20b270a 100644 --- a/src/metaglot/hack.py +++ b/src/metaglot/hack.py @@ -4,6 +4,7 @@ Each hack should be applied at the very start of ``main`` and documents why it exists and when it can be dropped. """ +import sys import liquid.builtin.expressions.primitive as _primitive # TODO: @@ -21,5 +22,5 @@ def relax_liquid_range_literal_boundary() -> None: without any error. Relax the bounds the library itself defines to a more large boundary (as its commented) """ - _primitive.MAX_RANGE = (2**53) - 1 - _primitive.MIN_RANGE = -(2**53) + 1 + _primitive.MAX_RANGE = sys.maxsize + _primitive.MIN_RANGE = -sys.maxsize