Skip to content

Commit

Permalink
Mark string raw to fix syntax warning
Browse files Browse the repository at this point in the history
Get a warning that \( is an invalid escape, but it's required so the
paren isn't interpreted as being for grouping.
  • Loading branch information
polm committed Apr 30, 2024
1 parent c5956db commit 866866a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posuto/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def build_json(fname):
row['note'] = note[1:-1] # trim parens
row['note'] = mojimoji.zen_to_han(row['note'], kana=False) # no zengaku :P
# don't need kana for note
row['neighborhood_kana'] = re.sub('\(.*\)?', '', row['neighborhood_kana'])
row['neighborhood_kana'] = re.sub(r'\(.*\)?', '', row['neighborhood_kana'])

# fix hankaku
for field in PARTS:
Expand Down

0 comments on commit 866866a

Please sign in to comment.