aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/docs.py
diff options
context:
space:
mode:
authorsnermolaev <snermolaev@yandex-team.ru>2022-02-10 16:45:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:53 +0300
commit2015790ac9fcc04caab83fccc23ab2460310a797 (patch)
treee644e9bc3f6f688561a871793b59bf8a637e0f72 /build/plugins/docs.py
parentc768a99151e47c3a4bb7b92c514d256abd301c4d (diff)
downloadydb-2015790ac9fcc04caab83fccc23ab2460310a797.tar.gz
Restoring authorship annotation for <snermolaev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/plugins/docs.py')
-rw-r--r--build/plugins/docs.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/build/plugins/docs.py b/build/plugins/docs.py
index 760fe3af7f7..d656ec876df 100644
--- a/build/plugins/docs.py
+++ b/build/plugins/docs.py
@@ -24,21 +24,21 @@ def macro_calls_to_dict(unit, calls):
def onprocess_docs(unit, *args):
- build_tool = unit.get('_DOCS_BUILDER_VALUE')
- if build_tool:
- if build_tool not in ['mkdocs', 'yfm']:
- unit.message(['error', 'Unsupported build tool {}'.format(build_tool)])
+ build_tool = unit.get('_DOCS_BUILDER_VALUE')
+ if build_tool:
+ if build_tool not in ['mkdocs', 'yfm']:
+ unit.message(['error', 'Unsupported build tool {}'.format(build_tool)])
else:
- build_tool = 'yfm'
- unit.ondocs_builder([build_tool])
- if build_tool == 'yfm' and unit.enabled('_DOCS_USE_PLANTUML'):
- unit.on_docs_yfm_use_plantuml([])
- orig_variables = macro_calls_to_dict(unit, extract_macro_calls(unit, '_DOCS_VARS_VALUE'))
- variables = {k: unit.get(k) or v for k, v in orig_variables.items()}
- if variables:
- if build_tool == 'mkdocs':
- unit.set(['_DOCS_VARS_FLAG', ' '.join(['--var {}={}'.format(k, v) for k, v in variables.items()])])
- elif build_tool == 'yfm':
- unit.set(['_DOCS_VARS_FLAG', '--vars {}'.format(json.dumps(json.dumps(variables, sort_keys=True)))])
- else:
- assert False, 'Unexpected build_tool value: [{}]'.format(build_tool)
+ build_tool = 'yfm'
+ unit.ondocs_builder([build_tool])
+ if build_tool == 'yfm' and unit.enabled('_DOCS_USE_PLANTUML'):
+ unit.on_docs_yfm_use_plantuml([])
+ orig_variables = macro_calls_to_dict(unit, extract_macro_calls(unit, '_DOCS_VARS_VALUE'))
+ variables = {k: unit.get(k) or v for k, v in orig_variables.items()}
+ if variables:
+ if build_tool == 'mkdocs':
+ unit.set(['_DOCS_VARS_FLAG', ' '.join(['--var {}={}'.format(k, v) for k, v in variables.items()])])
+ elif build_tool == 'yfm':
+ unit.set(['_DOCS_VARS_FLAG', '--vars {}'.format(json.dumps(json.dumps(variables, sort_keys=True)))])
+ else:
+ assert False, 'Unexpected build_tool value: [{}]'.format(build_tool)