marked regex with 'r'

This commit is contained in:
Oscar Krause 2024-11-22 15:07:54 +01:00
parent 1daa365df9
commit 1b6f142cb5

View File

@ -11,7 +11,7 @@ logger = logging.getLogger(__name__)
class PatchMalformedJsonMiddleware(BaseHTTPMiddleware): class PatchMalformedJsonMiddleware(BaseHTTPMiddleware):
# see oscar.krause/fastapi-dls#1 # see oscar.krause/fastapi-dls#1
REGEX = '(\"mac_address_list\"\:\s?\[)([\w\d])' REGEX = r'(\"mac_address_list\"\:\s?\[)([\w\d])'
def __init__(self, app, enabled: bool): def __init__(self, app, enabled: bool):
super().__init__(app) super().__init__(app)