File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 99from lxml import html
1010import certifi
1111
12- __version__ = "2.0.0"
13-
1412BASE_URL = "https://json-schema.org/draft/2020-12/"
1513VOCABULARIES = {
1614 "core" : urljoin (BASE_URL , "json-schema-core.html" ),
@@ -45,7 +43,7 @@ def setup(app):
4543 }
4644 app .add_role ("kw" , docutils_does_not_allow_using_classes (documents ))
4745
48- return dict (version = __version__ , parallel_read_safe = True )
46+ return dict (parallel_read_safe = True )
4947
5048
5149def fetch_or_load (vocabulary_path , url ):
@@ -63,12 +61,8 @@ def fetch_or_load(vocabulary_path, url):
6361 the URL of the vocabulary document
6462 """
6563
66- headers = {
67- "User-Agent" : "python-jsonschema v{} - documentation build v{}" .format (
68- metadata .version ("jsonschema" ),
69- __version__ ,
70- ),
71- }
64+ version = metadata .version ("sphinx-json-schema-spec" )
65+ headers = {"User-Agent" : f"sphinx-json-schema-spec v{ version } " }
7266
7367 with suppress (FileNotFoundError ):
7468 modified = datetime .utcfromtimestamp (vocabulary_path .stat ().st_mtime )
You can’t perform that action at this time.
0 commit comments