Skip to content

Commit

Permalink
Support Sphinx 6.x
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jun 25, 2024
1 parent 2d3152e commit dd333f5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 36 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
docutils>=0.16
sphinx<6,>=3.0.3
sphinx<7,>=3.0.3
sphinx-jinja2-compat>=0.2.0
26 changes: 14 additions & 12 deletions tests/test_output_/test_latex_output_37_.tex
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
<% if sphinx_version >= (5, 0) %>\ifdefined\shorthandoff
\ifnum\catcode`\=\string=\active\shorthandoff{=}\fi
\ifnum\catcode`\"=\active\shorthandoff{"}\fi
\fi<% endif %>
\fi
\pagestyle{empty}
<% endif %>\pagestyle{empty}
\sphinxmaketitle
\pagestyle{plain}
\sphinxtableofcontents
Expand Down Expand Up @@ -1626,7 +1626,7 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}

If a valid \sphinxstyleemphasis{align} value is specified, it can be preceded by a \sphinxstyleemphasis{fill}
character that can be any character and defaults to a space if omitted.
It is not possible to use a literal curly brace (<< '”' if sphinx_version >= (5, 0) else '“' >>\sphinxcode{\sphinxupquote{\{}}” or “\sphinxcode{\sphinxupquote{\}}}”) as
It is not possible to use a literal curly brace (<< '”' >>\sphinxcode{\sphinxupquote{\{}}” or “\sphinxcode{\sphinxupquote{\}}}”) as
the \sphinxstyleemphasis{fill} character in a \DUrole{xref,std,std-ref}{formatted string literal} or when using the \sphinxcode{\sphinxupquote{str.format()}}
method. However, it is possible to insert a curly brace
with a nested replacement field. This limitation doesn’t
Expand All @@ -1642,7 +1642,8 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\centering
\phantomsection\label{\detokenize{string:index-3}}\nobreak
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% endif %>
\sphinxtoprule<% else %>
\hline<% endif %>
\sphinxstyletheadfamily
Option
&\sphinxstyletheadfamily
Expand Down Expand Up @@ -1790,8 +1791,8 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\begin{quote}


\begin{savenotes}\sphinxattablestart
\sphinxthistablewithglobalstyle
\begin{savenotes}\sphinxattablestart<% if sphinx_version >= (5, 0) %>
\sphinxthistablewithglobalstyle<% endif %>
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>
Expand Down Expand Up @@ -1826,8 +1827,8 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\begin{quote}


\begin{savenotes}\sphinxattablestart
\sphinxthistablewithglobalstyle
\begin{savenotes}\sphinxattablestart<% if sphinx_version >= (5, 0) %>
\sphinxthistablewithglobalstyle<% endif %>
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>
Expand Down Expand Up @@ -1907,8 +1908,8 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\begin{quote}


\begin{savenotes}\sphinxattablestart
\sphinxthistablewithglobalstyle
\begin{savenotes}\sphinxattablestart<% if sphinx_version >= (5, 0) %>
\sphinxthistablewithglobalstyle<% endif %>
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>
Expand Down Expand Up @@ -2011,8 +2012,9 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
the particular value. The overall effect is to match the
output of \sphinxcode{\sphinxupquote{str()}} as altered by the other format
modifiers.
\\
\sphinxbottomrule
\\<% if sphinx_version >= (5, 0) %>
\sphinxbottomrule<% else %>
\hline<% endif %>
\end{tabulary}
<% if sphinx_version >= (5, 0) %>\sphinxtableafterendhook<% endif %>\par
\sphinxattableend\end{savenotes}
Expand Down
50 changes: 27 additions & 23 deletions tests/test_output_/test_latex_output_38_.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
<% if sphinx_version >= (6, 2) %>,<<char>><% endif %>
<%- endmacro -%>
<%- macro emph(text) -%>
\emph{<% if sphinx_version >= (4, 3) %>\DUrole{n<<sphinx6x_2nd('n')>>}{<<text>>}<% else %> <% endif %>}
\<< sphinxparam >>{<% if sphinx_version >= (4, 3) %>\DUrole{n<<sphinx6x_2nd('n')>>}{<<text>>}<% else %> <% endif %>}
<%- endmacro -%>
<%- set regex_columns = "TT" if sphinx_version >= (6, 0) else "|T|T|" -%>
<%- set du_role_2nd_n = ",n" if sphinx_version >= (6, 2) else "" -%>
<%- set du_role_2nd_o = ",o" if sphinx_version >= (6, 2) else "" -%>
%% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[letterpaper,10pt,english]{sphinxmanual}
Expand Down Expand Up @@ -179,7 +182,7 @@ \section{Module Contents}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{reader}}}{\emph{\DUrole{n}{csvfile}}, \emph{\DUrole{n}{dialect}\DUrole{o}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \emph{\DUrole{o}{**}\DUrole{n}{fmtparams}}}{}
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{reader}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{csvfile}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{dialect}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{**}\DUrole{n<< du_role_2nd_n >>}{fmtparams}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Return a reader object which will iterate over lines in the given \sphinxstyleemphasis{csvfile}.
Expand Down Expand Up @@ -231,7 +234,7 @@ \section{Module Contents}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{writer}}}{\emph{\DUrole{n}{csvfile}}, \emph{\DUrole{n}{dialect}\DUrole{o}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \emph{\DUrole{o}{**}\DUrole{n}{fmtparams}}}{}
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{writer}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{csvfile}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{dialect}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{**}\DUrole{n<< du_role_2nd_n >>}{fmtparams}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Return a writer object responsible for converting the user’s data into delimited
Expand Down Expand Up @@ -275,7 +278,7 @@ \section{Module Contents}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{register\_dialect}}}{<< emph("name")>>\sphinxoptional{, <<emph("dialect")>>\sphinxoptional{, <<emph("**fmtparams")>>}}}{}
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{register\_dialect}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{name}}\sphinxoptional{, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{dialect}}\sphinxoptional{, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{**fmtparams}}}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Associate \sphinxstyleemphasis{dialect} with \sphinxstyleemphasis{name}. \sphinxstyleemphasis{name} must be a string. The
Expand Down Expand Up @@ -375,7 +378,7 @@ \section{Module Contents}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class<% if sphinx_version >= (4, 3) %>\DUrole{w<<sphinx6x_2nd('w')>>}{ }<% else %> <% endif %>}}\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{DictReader}}}{\emph{\DUrole{n}{f}}, \emph{\DUrole{n}{fieldnames}\DUrole{o}{=}\DUrole{default_value}{None}}, \emph{\DUrole{n}{restkey}\DUrole{o}{=}\DUrole{default_value}{None}}, \emph{\DUrole{n}{restval}\DUrole{o}{=}\DUrole{default_value}{None}}, \emph{\DUrole{n}{dialect}\DUrole{o}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \emph{\DUrole{o}{*}\DUrole{n}{args}}, \emph{\DUrole{o}{**}\DUrole{n}{kwds}}}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class<% if sphinx_version >= (4, 3) %>\DUrole{w<<sphinx6x_2nd('w')>>}{ }<% else %> <% endif %>}}\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{DictReader}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{f}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{fieldnames}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{None}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{restkey}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{None}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{restval}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{None}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{dialect}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{*}\DUrole{n<< du_role_2nd_n >>}{args}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{**}\DUrole{n<< du_role_2nd_n >>}{kwds}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Create an object that operates like a regular reader but maps the
Expand Down Expand Up @@ -429,7 +432,7 @@ \section{Module Contents}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class<% if sphinx_version >= (4, 3) %>\DUrole{w<<sphinx6x_2nd('w')>>}{ }<% else %> <% endif %>}}\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{DictWriter}}}{\emph{\DUrole{n}{f}}, \emph{\DUrole{n}{fieldnames}}, \emph{\DUrole{n}{restval}\DUrole{o}{=}\DUrole{default_value}{\textquotesingle{}\textquotesingle{}}}, \emph{\DUrole{n}{extrasaction}\DUrole{o}{=}\DUrole{default_value}{\textquotesingle{}raise\textquotesingle{}}}, \emph{\DUrole{n}{dialect}\DUrole{o}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \emph{\DUrole{o}{*}\DUrole{n}{args}}, \emph{\DUrole{o}{**}\DUrole{n}{kwds}}}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class<% if sphinx_version >= (4, 3) %>\DUrole{w<<sphinx6x_2nd('w')>>}{ }<% else %> <% endif %>}}\sphinxcode{\sphinxupquote{csv.}}\sphinxbfcode{\sphinxupquote{DictWriter}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{f}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{fieldnames}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{restval}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\textquotesingle{}\textquotesingle{}}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{extrasaction}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\textquotesingle{}raise\textquotesingle{}}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{dialect}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\textquotesingle{}excel\textquotesingle{}}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{*}\DUrole{n<< du_role_2nd_n >>}{args}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{**}\DUrole{n<< du_role_2nd_n >>}{kwds}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Create an object which operates like a regular writer but maps dictionaries
Expand Down Expand Up @@ -569,7 +572,7 @@ \section{Module Contents}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{sniff}}}{\emph{\DUrole{n}{sample}}, \emph{\DUrole{n}{delimiters}\DUrole{o}{=}\DUrole{default_value}{None}}}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{sniff}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{sample}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{delimiters}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{None}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Analyze the given \sphinxstyleemphasis{sample} and return a {\hyperref[\detokenize{csv:csv.Dialect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Dialect}}}}} subclass
Expand All @@ -590,7 +593,7 @@ \section{Module Contents}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{has\_header}}}{<<emph("sample")>>}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{has\_header}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{sample}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Analyze the sample text (presumed to be in CSV format) and return
Expand Down Expand Up @@ -1325,7 +1328,7 @@ \section{Custom String Formatting}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format}}}{<<emph("format\_string")>>, \emph{\DUrole{o}{/}}, \emph{\DUrole{o}{*}\DUrole{n}{args}}, \emph{\DUrole{o}{**}\DUrole{n}{kwargs}}}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{format\_string}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{/}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{*}\DUrole{n<< du_role_2nd_n >>}{args}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{**}\DUrole{n<< du_role_2nd_n >>}{kwargs}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
The primary API method. It takes a format string and
Expand All @@ -1347,7 +1350,7 @@ \section{Custom String Formatting}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{vformat}}}{<<emph("format\_string")>>, <<emph("args")>>, <<emph("kwargs")>>}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{vformat}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{format\_string}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{args}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{kwargs}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
This function does the actual work of formatting. It is exposed as a
Expand Down Expand Up @@ -1641,8 +1644,8 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\sphinxthistablewithglobalstyle<% endif %>
\centering
\phantomsection\label{\detokenize{string:index-3}}\nobreak
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% endif %>
\begin{tabulary}{\linewidth}[t]{<< regex_columns >>}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>\hline<% endif %>
\sphinxstyletheadfamily
Option
&\sphinxstyletheadfamily
Expand Down Expand Up @@ -1701,7 +1704,7 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\sphinxthistablewithglobalstyle<% endif %>
\centering
\phantomsection\label{\detokenize{string:index-4}}\nobreak
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\begin{tabulary}{\linewidth}[t]{<< regex_columns >>}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>
\hline<% endif %>
\sphinxstyletheadfamily
Expand Down Expand Up @@ -1793,7 +1796,7 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\begin{savenotes}\sphinxattablestart
\sphinxthistablewithglobalstyle
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\begin{tabulary}{\linewidth}[t]{<< regex_columns >>}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>
\hline<% endif %>
\sphinxstyletheadfamily
Expand Down Expand Up @@ -1829,7 +1832,7 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\begin{savenotes}\sphinxattablestart
\sphinxthistablewithglobalstyle
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\begin{tabulary}{\linewidth}[t]{<< regex_columns >>}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>
\hline<% endif %>
\sphinxstyletheadfamily
Expand Down Expand Up @@ -1910,7 +1913,7 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
\begin{savenotes}\sphinxattablestart
\sphinxthistablewithglobalstyle
\centering
\begin{tabulary}{\linewidth}[t]{|T|T|}<% if sphinx_version >= (5, 0) %>
\begin{tabulary}{\linewidth}[t]{<< regex_columns >>}<% if sphinx_version >= (5, 0) %>
\sphinxtoprule<% else %>
\hline<% endif %>
\sphinxstyletheadfamily
Expand Down Expand Up @@ -2011,8 +2014,9 @@ \subsection{Format Specification Mini\sphinxhyphen{}Language}
the particular value. The overall effect is to match the
output of \sphinxcode{\sphinxupquote{str()}} as altered by the other format
modifiers.
\\
\sphinxbottomrule
\\<% if sphinx_version >= (5, 0) %>
\sphinxbottomrule<% else %>
\hline<% endif %>
\end{tabulary}
<% if sphinx_version >= (5, 0) %>\sphinxtableafterendhook<% endif %>\par
\sphinxattableend\end{savenotes}
Expand Down Expand Up @@ -2227,7 +2231,7 @@ \section{Template strings}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class\DUrole{w<< sphinx6x_2nd('n') >>}{ }}}\sphinxcode{\sphinxupquote{string.}}\sphinxbfcode{\sphinxupquote{Template}}}{<<emph("template")>>}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class<% if sphinx_version >= (4, 3) %>\DUrole{w<<sphinx6x_2nd('w')>>}{ }<% else %> <% endif %>}}\sphinxcode{\sphinxupquote{string.}}\sphinxbfcode{\sphinxupquote{Template}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{template}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
The constructor takes a single argument which is the template string.
Expand All @@ -2242,7 +2246,7 @@ \section{Template strings}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{substitute}}}{\emph{\DUrole{n}{mapping}\DUrole{o}{=}\DUrole{default_value}{\{\}}}, \emph{\DUrole{o}{/}}, \emph{\DUrole{o}{**}\DUrole{n}{kwds}}}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{substitute}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{mapping}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\{\}}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{/}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{**}\DUrole{n<< du_role_2nd_n >>}{kwds}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Performs the template substitution, returning a new string. \sphinxstyleemphasis{mapping} is
Expand All @@ -2264,7 +2268,7 @@ \section{Template strings}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{safe\_substitute}}}{\emph{\DUrole{n}{mapping}\DUrole{o}{=}\DUrole{default_value}{\{\}}}, \emph{\DUrole{o}{/}}, \emph{\DUrole{o}{**}\DUrole{n}{kwds}}}{}
\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{safe\_substitute}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{mapping}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{\{\}}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{/}}, \<< sphinxparam >>{\DUrole{o<< du_role_2nd_o >>}{**}\DUrole{n<< du_role_2nd_n >>}{kwds}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Like {\hyperref[\detokenize{string:string.Template.substitute}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{substitute()}}}}}, except that if placeholders are missing from
Expand Down Expand Up @@ -2409,7 +2413,7 @@ \section{Helper functions}
<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{string.}}\sphinxbfcode{\sphinxupquote{capwords}}}{<<emph("s")>>, \emph{\DUrole{n}{sep}\DUrole{o}{=}\DUrole{default_value}{None}}}{}
\pysiglinewithargsret{\sphinxcode{\sphinxupquote{string.}}\sphinxbfcode{\sphinxupquote{capwords}}}{\<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{s}}, \<< sphinxparam >>{\DUrole{n<< du_role_2nd_n >>}{sep}\DUrole{o<< du_role_2nd_o >>}{=}\DUrole{default_value}{None}}}{}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
Split the argument into words using \sphinxcode{\sphinxupquote{str.split()}}, capitalize each word
Expand All @@ -2431,7 +2435,7 @@ \section{Helper functions}
\phantomsection\label{\detokenize{index:name_with_underscores}}<%- if sphinx_version > (4, 5) %>
\pysigstartsignatures
<% endif -%>
\pysigline{\sphinxbfcode{\sphinxupquote{class\DUrole{w<< sphinx6x_2nd('n') >>}{ }}}\sphinxbfcode{\sphinxupquote{name\_with\_underscores}}}
\pysigline{\sphinxbfcode{\sphinxupquote{class\DUrole{w<< sphinx6x_2nd('w') >>}{ }}}\sphinxbfcode{\sphinxupquote{name\_with\_underscores}}}
<% if sphinx_version > (4, 5) %>\pysigstopsignatures
<% endif -%>
\end{fulllineitems}
Expand Down

0 comments on commit dd333f5

Please sign in to comment.