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

Overloaded default values rendered as string literal. #10279

Closed
laurensvalk opened this issue Mar 21, 2022 · 2 comments
Closed

Overloaded default values rendered as string literal. #10279

laurensvalk opened this issue Mar 21, 2022 · 2 comments

Comments

@laurensvalk
Copy link

Describe the bug

Some arguments of overloaded functions are rendered as a string literal. For example:

file: _io.FileIO = 'sys.stdin'

See screenshot below.

This may be a variant of #8693

How to Reproduce

Exactly the same as #10278

Expected behavior

Default values not rendered as string literals.

Your project

https://github.com/pybricks/sphinx-issues-minimal

Screenshots

image

OS

Ubuntu

Python version

3.8.3

Sphinx version

4.4.0

Sphinx extensions

'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx_rtd_theme'

Extra tools

No response

Additional context

This was originally posted here: pybricks/pybricks-api#81

tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 31, 2022
…g literal

When processing overloaded functions, autodoc unexpectedly renders its
default values for kwonlyargs as a string literal unexpectedly
@tk0miya tk0miya added this to the 5.0.0 milestone Mar 31, 2022
tk0miya added a commit to tk0miya/sphinx that referenced this issue Mar 31, 2022
…g literal

When processing overloaded functions, autodoc unexpectedly renders its
default values for kwonlyargs as a string literal unexpectedly
@laurensvalk
Copy link
Author

I confirm that tk0miya@5e418b4 fixes this issue and #10278 too. Thank you!

image

tk0miya added a commit to tk0miya/sphinx that referenced this issue Apr 1, 2022
…g literal

When processing overloaded functions, autodoc unexpectedly renders its
default values for kwonlyargs as a string literal unexpectedly
@tk0miya
Copy link
Member

tk0miya commented Apr 1, 2022

Thank you for confirmation!

tk0miya added a commit that referenced this issue Apr 1, 2022
…in_overloads

Fix #10279: autodoc: Default values are rendered as a string literal
@tk0miya tk0miya closed this as completed Apr 1, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2022
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

2 participants