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

Cannot I disable constant expansion in default argument values? #1806

Closed
Felix-neko opened this issue Mar 25, 2015 · 4 comments
Closed

Cannot I disable constant expansion in default argument values? #1806

Felix-neko opened this issue Mar 25, 2015 · 4 comments

Comments

@Felix-neko
Copy link

I have some functions like

f(x, propagation_speed=scipy.constants.c)

I run sphinx-apidoc to generate documentation on them and them make html to get final HTML data.

Alas, Sphinx expands the constants and gives me something like

f(x, propagation_speed=299792458.0)

Cannot I somehow disable the default values expansion in docstrings? Could I add something to conf.py?

@Felix-neko
Copy link
Author

P.S. Also, even if I write

f(x, propagation_speed=3e8)

Sphinx gives me
f(x, propagation_speed=300000000.0)

It's extremely annoying to count the number of zeros.
^__^

@Felix-neko
Copy link
Author

P.P.S. If you're importing the modules, it's possible to get their path by __file__ attribute and them parse them as text files. So it's possible, for example, to pass the full text of function or method signature to autodoc-process-signature.

@danielshahaf
Copy link

Duplicate of #759 ?

@tk0miya
Copy link
Member

tk0miya commented Mar 6, 2018

We'll track this issue in #759.
Thank you for reporting

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants