Skip to content

Commit

Permalink
Merge pull request #287 from stinodego/fix-depr-regex-sub
Browse files Browse the repository at this point in the history
Fix deprecation warning in `re.sub` for Python 3.13
  • Loading branch information
dilshod authored Dec 14, 2024
2 parents 4ac753a + 3436cda commit 5038b39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xlsx2csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def handleCharData(self, data):
else:
# ignore ";@", don't know what does it mean right now
# ignore "[$-409], [$-f409], [$-16001]" and similar format codes
dateformat = re.sub(r"\[\$\-[A-z0-9]*\]", "", format_str, 1) \
dateformat = re.sub(r"\[\$\-[A-z0-9]*\]", "", format_str, count=1) \
.replace(";@", "").replace("yyyy", "%Y").replace("yy", "%y") \
.replace("hh:mm", "%H:%M").replace("h", "%I").replace("%H%H", "%H") \
.replace("ss", "%S").replace("dddd", "d").replace("dd", "d").replace("d", "%d") \
Expand Down

0 comments on commit 5038b39

Please sign in to comment.