-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
ENH: Modify the markups for parameters (x
to *x*)
#303
base: main
Are you sure you want to change the base?
Conversation
There is a failing test. It would be good to add a test that fails before, passes after this change. |
Is this the same issue in gh-295? |
I think it's not the same issue, because gh-295 is about whether to convert from |
Changing to using asterisks is a big change. Putting a specific role before
or would be okay, but it should be configurable. The library can also
configure how the role is interpreted and can make it visually appear the
same as asterisks would.
|
Now I changed to use a new config variable |
I noticed that adding a role could break a table structure. In the docstring of
|
Indeed, that will be hard to fix, but... I don't get why we're substituting
every mention of the param name in any case. Why are we doing that?
|
In fact, I would like to see an example docstrng use case of where this PR is needed. |
There are some functions which have |
Related to numpy/numpy#17714 .
Currently,
numpydoc
do nothing about the markup for single backticks (`x`
). Sphinx seems to interpret`x`
as a parameter name (*x*
) when the python objectx
doesn't exists, and a reference (:obj:`x`
) otherwise. This process works fine in most cases, but doesn't work if a python object which has the same name as the parameter name exists (see numpy/numpy#17714 (comment) : collision between`size`
parameter andnumpy.size
). So I added a process to convert`x`
to*x*
for a parameter namex
.