Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/fastjsonschema/draft2019.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

3 statements  

1from .draft07 import CodeGeneratorDraft07 

2 

3 

4class CodeGeneratorDraft2019(CodeGeneratorDraft07): 

5 FORMAT_REGEXS = dict(CodeGeneratorDraft07.FORMAT_REGEXS, **{ 

6 'uuid': r'^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\Z', 

7 # ISO 8601 duration from RFC 3339 Appendix A 

8 'duration': ( 

9 r'^P(?!$)' 

10 r'(?:' 

11 r'[0-9]+W' 

12 r'|(?:[0-9]+Y)?(?:[0-9]+M)?(?:[0-9]+D)?(?:T(?=[0-9])(?:[0-9]+H)?(?:[0-9]+M)?(?:[0-9]+S)?)?' 

13 r')\Z' 

14 ), 

15 })