Skip to content

Commit

Permalink
Fix cpplint sre_compile deprecation warning (#262)
Browse files Browse the repository at this point in the history
sre_compile is an implementation detail of the re module that moved in
Python 3.11.
  • Loading branch information
calcmogul authored Oct 9, 2023
1 parent b7a8101 commit 6c38af7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion wpiformat/wpiformat/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@
import math # for log
import os
import regex
import sre_compile
import string
import sys

try:
import re._compiler as sre_compile
except ImportError: # Python < 3.11
import sre_compile

# if empty, use defaults
_header_regex = regex.compile("a^")

Expand Down

0 comments on commit 6c38af7

Please sign in to comment.