|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
| 3 | +from pathlib import Path |
| 4 | + |
3 | 5 | from docutils.parsers.rst import directives |
4 | 6 |
|
5 | 7 | # -- Configuration to keep autosummary in sync with autoclass::members ---------------------------------------------- |
|
86 | 88 | # |
87 | 89 | # This is also used if you do content translation via gettext catalogs. |
88 | 90 | # Usually you set "language" from the command line for these cases. |
89 | | -language = None |
| 91 | +language = "en" |
90 | 92 |
|
91 | 93 | # There are two options for replacing |today|: either, you set today to some |
92 | 94 | # non-false value, then it is used: |
|
385 | 387 | # Link to GitHub issues and pull requests using :pr:`1234` and :issue:`1234` |
386 | 388 | # syntax |
387 | 389 | extlinks = { |
388 | | - "issue": ("https://github.com/dask/distributed/issues/%s", "GH#"), |
389 | | - "pr": ("https://github.com/dask/distributed/pull/%s", "GH#"), |
| 390 | + "issue": ("https://github.com/dask/distributed/issues/%s", "GH#%s"), |
| 391 | + "pr": ("https://github.com/dask/distributed/pull/%s", "GH#%s"), |
390 | 392 | } |
391 | 393 |
|
392 | 394 | # Configuration for intersphinx: refer to the Python standard library |
@@ -432,9 +434,8 @@ def copy_legacy_redirects(app, docname): |
432 | 434 | if app.builder.name == "html": |
433 | 435 | for html_src_path, new in redirect_files: |
434 | 436 | page = redirect_template.format(new=new) |
435 | | - target_path = app.outdir + "/" + html_src_path |
436 | | - with open(target_path, "w") as f: |
437 | | - f.write(page) |
| 437 | + target_path = Path(app.outdir) / html_src_path |
| 438 | + target_path.write_text(page) |
438 | 439 |
|
439 | 440 |
|
440 | 441 | class AutoAutoSummary(Autosummary): |
|
0 commit comments