Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix some doc warnings and xrefs #2176

Merged
merged 1 commit into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,7 @@ Breaking changes:

### Added

* (bzlmod, entry_point) Added
[`py_console_script_binary`](./docs/py_console_script_binary.md), which
* (bzlmod, entry_point) Added {obj}`py_console_script_binary`, which
allows adding custom dependencies to a package's entry points and customizing
the `py_binary` rule used to build it.

Expand Down
1 change: 0 additions & 1 deletion docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

```{toctree}
:glob:
*
*/index
```
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
autodoc2_docstring_parser_regexes = [
(".*", "myst"),
]

# NOTE: The redirects generation will clobber existing files.
redirects = {
"api/tools/precompiler/index": "/api/rules_python/tools/precompiler/index.html",
Expand Down
4 changes: 3 additions & 1 deletion python/private/pypi/pip_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ alias(
)
```

### Vendoring the requirements.bzl file
:::{rubric} Vendoring the requirements.bzl file
:heading-level: 3
:::

In some cases you may not want to generate the requirements.bzl file as a repository rule
while Bazel is fetching dependencies. For example, if you produce a reusable Bazel module
Expand Down
26 changes: 10 additions & 16 deletions sphinxdocs/docs/sphinx-bzl.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ Refer to a target.

:::{rst:role} bzl:type
Refer to a type or type expression; can also be used in argument documentation.

```
def func(arg):
"""Do stuff

Args:
arg: {type}`int | str` the arg
"""
print(arg + 1)
```
:::

## Special roles
Expand Down Expand Up @@ -187,22 +197,6 @@ def func():
```
:::

:::{rst:role} bzl:type

Indicates the type of an argument for a function. Use it in the Args doc of
a function.

```
def func(arg):
"""Do stuff

Args:
arg: {type}`int`
"""
print(arg + 1)
```
:::

## Directives

Most directives are automatically generated by `sphinx_stardoc`. Here, we only
Expand Down