File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -412,18 +412,15 @@ def is_relative_json_pointer(instance):
412
412
413
413
414
414
try :
415
- import uritemplate . exceptions
415
+ import uri_template
416
416
except ImportError :
417
417
pass
418
418
else :
419
419
@_checks_drafts (
420
420
draft6 = "uri-template" ,
421
421
draft7 = "uri-template" ,
422
- raises = uritemplate .exceptions .InvalidTemplate ,
423
422
)
424
- def is_uri_template (
425
- instance ,
426
- template_validator = uritemplate .Validator ().force_balanced_braces (),
427
- ):
428
- template = uritemplate .URITemplate (instance )
429
- return template_validator .validate (template )
423
+ def is_uri_template (instance ):
424
+ if not isinstance (instance , str ):
425
+ return True
426
+ return uri_template .validate (instance )
Original file line number Diff line number Diff line change @@ -38,13 +38,15 @@ format =
38
38
rfc3987
39
39
strict-rfc3339
40
40
webcolors
41
+ uri_template
41
42
format_nongpl =
42
43
fqdn
43
44
idna
44
45
jsonpointer>1.13
45
46
webcolors
46
47
rfc3986-validator>0.1.0
47
48
rfc3339-validator
49
+ uri_template
48
50
49
51
[options.entry_points]
50
52
console_scripts =
You can’t perform that action at this time.
0 commit comments