Skip to content

Commit

Permalink
docs: Add function signature line breaks
Browse files Browse the repository at this point in the history
Change-Id: I332ba1fa206ea76f3a7aa4cc2d3a0dfad7f254cb
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/168554
Commit-Queue: Kayce Basques <[email protected]>
Pigweed-Auto-Submit: Kayce Basques <[email protected]>
Commit-Queue: Anthony DiGirolamo <[email protected]>
Reviewed-by: Kayce Basques <[email protected]>
  • Loading branch information
AnthonyDiGirolamo authored and CQ Bot Account committed Aug 25, 2023
1 parent 50ec0b1 commit 98eda46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/_static/css/pigweed.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

.sidebar-brand-text {
font-size: 2.5rem;
text-align: center;
}

/********** General document coloring ***********/
Expand Down Expand Up @@ -78,6 +79,12 @@ dl.describe>dt {
text-indent: 0em;
}

/* Remove blank space before/after function signature open/close parens. */
.sig > dl {
margin-block-start: 0;
margin-block-end: 0;
}

/* Make inline code standout more */
code.literal {
border: 1px solid var(--color-inline-code-border);
Expand Down
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@
# Disable Python type hints
# autodoc_typehints = 'none'

# Break class and function signature arguments into one arg per line if the
# total length exceeds 130 characters. 130 seems about right for keeping one or
# two parameters on a single line.
maximum_signature_line_length = 130


def do_not_skip_init(app, what, name, obj, would_skip, options):
if name == "__init__":
Expand Down

0 comments on commit 98eda46

Please sign in to comment.