Skip to content

Commit

Permalink
Fix docstring for anti_trim function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nijanthanvijayakumar committed Jul 8, 2024
1 parent 90bcfc4 commit 9b787c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quinn/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
Expand Down

0 comments on commit 9b787c9

Please sign in to comment.