Make Path._SEGMENT_PATTERN compatible with fastjsonschema

This commit is contained in:
Gergely Polonkai 2022-05-05 13:38:33 +02:00
parent 129bce02e2
commit 22d33a5d41
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ PATH_CHARACTER = ALPHA_LOWER + ALPHA_UPPER + DIGIT + PATH_PUNCTUATION
class Path: class Path:
"""A document path""" """A document path"""
_SEGMENT_PATTERN = f'/[{PATH_CHARACTER}]+' _SEGMENT_PATTERN = f'/[{PATH_CHARACTER}]+'.replace('$', '\\$')
_PATTERN = f'^({_SEGMENT_PATTERN})+$' _PATTERN = f'^({_SEGMENT_PATTERN})+$'
def __init__(self, path: str) -> None: def __init__(self, path: str) -> None: