Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions syncode/mask_store/mask_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ def _remove_left_whitespace(
if (self._fsms.initial(fsm_state.terminal) == fsm_state or self._fsms.is_final(fsm_state)) and self._ignore_whitespace:
if isinstance(remainder, bytes):
# For bytes, use lstrip() to remove all leading whitespace
remainder = remainder.lstrip()
remainder = remainder.lstrip(b' ')
elif isinstance(remainder, str):
# For strings, use lstrip() to remove all leading whitespace
remainder = remainder.lstrip()
remainder = remainder.lstrip(' ')
return remainder

def _lookup_next_tokens_for_fsm_state(self, fsm_state: JointFSMState, next_terminal) -> torch.Tensor:
Expand Down