diff --git a/wpiformat/wpiformat/cpplint.py b/wpiformat/wpiformat/cpplint.py index f5239cf..53dee70 100644 --- a/wpiformat/wpiformat/cpplint.py +++ b/wpiformat/wpiformat/cpplint.py @@ -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^")