99from sphinx .locale import _
1010from sphinx .util import i18n as sphinx_i18n
1111
12+ from exasol .toolbox .version import VERSION
13+
1214logger = logging .getLogger (__name__ )
1315
1416DATE_FMT = "%Y-%m-%d %H:%M:%S %z"
@@ -136,11 +138,13 @@ def in_development(self):
136138 def __iter__ (self ):
137139 tags = (
138140 ExasolVersionTag (tag )
139- for tag in self .tags if ExasolVersionTag .is_valid_tag (tag )
141+ for tag in self .tags
142+ if ExasolVersionTag .is_valid_tag (tag )
140143 )
141144 yield from self .branches
142145 yield from [
143- t .version for t in sorted (tags , key = lambda t : t .version_triple , reverse = True )
146+ t .version
147+ for t in sorted (tags , key = lambda t : t .version_triple , reverse = True )
144148 ]
145149
146150 def __getitem__ (self , name ):
@@ -167,22 +171,19 @@ def vpathto(self, other_version_name):
167171 other_outputroot = os .path .abspath (other_version ["outputdir" ])
168172 outputroot = os .path .commonpath ((current_outputroot , other_outputroot ))
169173
170- current_outputroot = os .path .relpath (
171- current_outputroot , start = outputroot )
174+ current_outputroot = os .path .relpath (current_outputroot , start = outputroot )
172175 other_outputroot = os .path .relpath (other_outputroot , start = outputroot )
173176
174177 # Ensure that we use POSIX separators in the path (for the HTML code)
175178 if os .sep != posixpath .sep :
176- current_outputroot = posixpath .join (
177- * os .path .split (current_outputroot ))
179+ current_outputroot = posixpath .join (* os .path .split (current_outputroot ))
178180 other_outputroot = posixpath .join (* os .path .split (other_outputroot ))
179181
180182 # Find relative path to root of other_version's outputdir
181183 current_outputdir = posixpath .dirname (
182184 posixpath .join (current_outputroot , self .context ["pagename" ])
183185 )
184- other_outputdir = posixpath .relpath (
185- other_outputroot , start = current_outputdir )
186+ other_outputdir = posixpath .relpath (other_outputroot , start = current_outputdir )
186187
187188 if not self .vhasdoc (other_version_name ):
188189 return posixpath .join (other_outputdir , "index.html" )
@@ -284,14 +285,10 @@ def setup(app):
284285 app .add_config_value ("smv_current_version" , "" , "html" )
285286 app .add_config_value ("smv_latest_version" , "master" , "html" )
286287 app .add_config_value ("smv_tag_whitelist" , DEFAULT_TAG_WHITELIST , "html" )
287- app .add_config_value ("smv_branch_whitelist" ,
288- DEFAULT_BRANCH_WHITELIST , "html" )
289- app .add_config_value ("smv_remote_whitelist" ,
290- DEFAULT_REMOTE_WHITELIST , "html" )
291- app .add_config_value ("smv_released_pattern" ,
292- DEFAULT_RELEASED_PATTERN , "html" )
293- app .add_config_value ("smv_outputdir_format" ,
294- DEFAULT_OUTPUTDIR_FORMAT , "html" )
288+ app .add_config_value ("smv_branch_whitelist" , DEFAULT_BRANCH_WHITELIST , "html" )
289+ app .add_config_value ("smv_remote_whitelist" , DEFAULT_REMOTE_WHITELIST , "html" )
290+ app .add_config_value ("smv_released_pattern" , DEFAULT_RELEASED_PATTERN , "html" )
291+ app .add_config_value ("smv_outputdir_format" , DEFAULT_OUTPUTDIR_FORMAT , "html" )
295292 app .add_config_value ("smv_build_targets" , DEFAULT_BUILD_TARGETS , "html" )
296293 app .add_config_value (
297294 "smv_clean_intermediate_files" ,
@@ -301,7 +298,7 @@ def setup(app):
301298 app .connect ("config-inited" , config_inited )
302299
303300 return {
304- "version" : "0.2" ,
301+ "version" : VERSION ,
305302 "parallel_read_safe" : True ,
306303 "parallel_write_safe" : True ,
307304 }
0 commit comments