From 9b787c9fae5e791b07e688f49628536fd9614b09 Mon Sep 17 00:00:00 2001 From: Nijanthan Vijayakumar <6072170+nijanthanvijayakumar@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:04:58 +1000 Subject: [PATCH] Fix docstring for anti_trim function Related to #227 Update the docstring for the `anti_trim` function to correctly describe its behavior. * Change the docstring to state that the function removes all inner whitespace but retains leading and trailing whitespace. --- quinn/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quinn/functions.py b/quinn/functions.py index a6764e9e..f802ae55 100644 --- a/quinn/functions.py +++ b/quinn/functions.py @@ -60,11 +60,11 @@ def remove_all_whitespace(col: Column) -> Column: def anti_trim(col: Column) -> Column: - """Remove whitespace from the boundaries of ``col`` using the regexp_replace function. + """Remove all inner whitespace but retain leading and trailing whitespace. :param col: Column on which to perform the regexp_replace. :type col: Column - :return: A new Column with all whitespace removed from the boundaries. + :return: A new Column with all inner whitespace removed but leading and trailing whitespace retained. :rtype: Column """ return F.regexp_replace(col, "\\b\\s+\\b", "")