Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from .draft06 import CodeGeneratorDraft06
class CodeGeneratorDraft07(CodeGeneratorDraft06):
FORMAT_REGEXS = dict(CodeGeneratorDraft06.FORMAT_REGEXS, **{
'date': r'^(?P\d{4})-(?P\d{1,2})-(?P\d{1,2})\Z',
'iri': r'^\w+:(\/?\/?)[^\s]+\Z',
'iri-reference': r'^(\w+:(\/?\/?))?[^#\\\s]*(#[^\\\s]*)?\Z',
'idn-email': r'^[^@]+@[^@]+\.[^@]+\Z',
#'idn-hostname': r'',
'relative-json-pointer': r'^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)\Z',
#'regex': r'',
'time': (
r'^(?P\d{1,2}):(?P\d{1,2})'
r'(?::(?P\d{1,2})(?:\.(?P\d{1,6}))?'
r'([zZ]|[+-]\d\d:\d\d)?)?\Z'
),
})
def __init__(self, definition, resolver=None, formats={}):
super().__init__(definition, resolver, formats)