Skip to content

Commit f6e1c8b

Browse files
committed
format files
1 parent ceefdce commit f6e1c8b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

sphinxdocs/private/sphinx.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ def _sphinx_docs_impl(ctx):
235235
_sphinx_docs = rule(
236236
implementation = _sphinx_docs_impl,
237237
attrs = {
238+
"allow_persistent_workers": attr.bool(
239+
doc = "(experimental) Whether to invoke Sphinx as a persistent worker.",
240+
default = False,
241+
),
238242
"extra_opts": attr.string_list(
239243
doc = "Additional options to pass onto Sphinx. These are added after " +
240244
"other options, but before the source/output args.",
@@ -254,10 +258,6 @@ _sphinx_docs = rule(
254258
cfg = "exec",
255259
doc = "Additional tools that are used by Sphinx and its plugins.",
256260
),
257-
"allow_persistent_workers": attr.bool(
258-
doc = "(experimental) Whether to invoke Sphinx as a persistent worker.",
259-
default = False,
260-
),
261261
"_extra_defines_flag": attr.label(default = "//sphinxdocs:extra_defines"),
262262
"_extra_env_flag": attr.label(default = "//sphinxdocs:extra_env"),
263263
"_quiet_flag": attr.label(default = "//sphinxdocs:quiet"),

sphinxdocs/private/sphinx_build.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ def _handle_env_get_outdated(self, app, env, added, changed, removed):
205205
logger.info("changed docs: %s", changed)
206206
return changed
207207

208+
208209
def _worker_main(stdin, stdout, exec_root):
209210
with Worker(stdin, stdout, exec_root) as worker:
210211
return worker.run()
@@ -222,6 +223,7 @@ def _non_worker_main():
222223
sys.argv[:] = args
223224
return main()
224225

226+
225227
if __name__ == "__main__":
226228
if "--persistent_worker" in sys.argv:
227229
sys.exit(_worker_main(sys.stdin, sys.stdout, os.getcwd()))

0 commit comments

Comments
 (0)