aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/docs.py
diff options
context:
space:
mode:
authorworkfork <workfork@yandex-team.ru>2022-02-10 16:46:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:43 +0300
commit89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /build/plugins/docs.py
parentc3745173272d1cf5b0642debb40d019e7ae71094 (diff)
downloadydb-89db6fe2fe2c32d2a832ddfeb04e8d078e301084.tar.gz
Restoring authorship annotation for <workfork@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/plugins/docs.py')
-rw-r--r--build/plugins/docs.py54
1 files changed, 27 insertions, 27 deletions
diff --git a/build/plugins/docs.py b/build/plugins/docs.py
index a144b1772b..760fe3af7f 100644
--- a/build/plugins/docs.py
+++ b/build/plugins/docs.py
@@ -1,34 +1,34 @@
-import json
-
-
-def extract_macro_calls(unit, macro_value_name):
- if not unit.get(macro_value_name):
- return []
-
- return filter(None, unit.get(macro_value_name).replace('$' + macro_value_name, '').split())
-
-
-def macro_calls_to_dict(unit, calls):
- def split_args(arg):
- if arg is None:
- return None
-
- kv = filter(None, arg.split('='))
- if len(kv) != 2:
- unit.message(['error', 'Invalid variables specification "{}": value expected to be in form %name%=%value% (with no spaces)'.format(arg)])
- return None
-
- return kv
-
- return dict(filter(None, map(split_args, calls)))
-
-
-def onprocess_docs(unit, *args):
+import json
+
+
+def extract_macro_calls(unit, macro_value_name):
+ if not unit.get(macro_value_name):
+ return []
+
+ return filter(None, unit.get(macro_value_name).replace('$' + macro_value_name, '').split())
+
+
+def macro_calls_to_dict(unit, calls):
+ def split_args(arg):
+ if arg is None:
+ return None
+
+ kv = filter(None, arg.split('='))
+ if len(kv) != 2:
+ unit.message(['error', 'Invalid variables specification "{}": value expected to be in form %name%=%value% (with no spaces)'.format(arg)])
+ return None
+
+ return kv
+
+ return dict(filter(None, map(split_args, 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)])
- else:
+ else:
build_tool = 'yfm'
unit.ondocs_builder([build_tool])
if build_tool == 'yfm' and unit.enabled('_DOCS_USE_PLANTUML'):