Skip to content

Commit b1cc66a

Browse files
committed
Update _fmt_lg()
1 parent 5f3c8fb commit b1cc66a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

pointblank/validate.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13881,8 +13881,17 @@ def _format_number_safe(value: int) -> str:
1388113881
]
1388213882

1388313883

13884-
def _fmt_lg(value: int, locale: str) -> str:
13885-
return vals.fmt_number(value, n_sigfig=3, compact=True, locale=locale)[0]
13884+
def _fmt_lg(value: int, locale: str, df_lib=None) -> str:
13885+
if df_lib is not None:
13886+
# Use GT-based formatting if a DataFrame library is provided
13887+
return _format_single_number_with_gt(
13888+
value, n_sigfig=3, compact=True, locale=locale, df_lib=df_lib
13889+
)
13890+
else:
13891+
# Fallback to the original behavior
13892+
return vals.fmt_number(value, n_sigfig=3, compact=True, locale=locale)[0]
13893+
13894+
1388613895
def _format_single_float_with_gt(
1388713896
value: float, decimals: int = 2, locale: str = "en", df_lib=None
1388813897
) -> str:

0 commit comments

Comments
 (0)