Skip to content

Commit e1acfd0

Browse files
Pre-commit auto-fix
1 parent 2f61c0f commit e1acfd0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/textUtils/wordSeg/wordSegStrategy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ def segmentedText(self, sep: str = " ", newSepIndex: list[int] | None = None) ->
308308
nextSlice = self.text[curIndex:postIndex]
309309

310310
# Determine whether any punctuation forbids a separator
311-
noSep = unicodedata.category(self.text[curIndex-1])[0] in "pP" or unicodedata.category(self.text[curIndex])[0] in "pP" # Punctuation categories
311+
noSep = (
312+
unicodedata.category(self.text[curIndex - 1])[0] in "pP"
313+
or unicodedata.category(self.text[curIndex])[0] in "pP"
314+
) # Punctuation categories
312315

313316
if not noSep:
314317
# If neither side forbids the separator, add it

0 commit comments

Comments
 (0)