Skip to content

Commit

Permalink
Merge pull request #93 from benhiller/esc_seq
Browse files Browse the repository at this point in the history
Fix invalid escape sequence warning
  • Loading branch information
ppannuto authored Sep 11, 2023
2 parents c1855c5 + fb0b88e commit 9c771d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion titlecase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def titlecase(text, callback=None, small_first_last=True, preserve_blank_lines=F
# too short (like "St", don't apply this)
CONSONANTS = ''.join(set(string.ascii_lowercase)
- {'a', 'e', 'i', 'o', 'u', 'y'})
is_all_consonants = regex.search('\A[' + CONSONANTS + ']+\Z', word,
is_all_consonants = regex.search(r'\A[' + CONSONANTS + r']+\Z', word,
flags=regex.IGNORECASE)
if is_all_consonants and len(word) > 2:
tc_line.append(word.upper())
Expand Down

0 comments on commit 9c771d1

Please sign in to comment.