Skip to content

autodoc: add support for python_display_short_literal #12003

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

Merged

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Feb 24, 2024

Closes #11995.

@user27182 Could you check if this patch works? I added a test but since I refactored autodoc for that, I want to be sure that I didn't forget some places (and this can essentially be checked with large projects).

I won't merge this one until I get approval from another maintainer since it's a fairly sensitive component.

@picnixz
Copy link
Member Author

picnixz commented Feb 29, 2024

So now, we have another flaky test on windows 😆 It's entirely caused by the network so I don't have a good way to make it "safe and easy"

@jayaddison
Copy link
Contributor

So now, we have another flaky test on windows 😆 It's entirely caused by the network so I don't have a good way to make it "safe and easy"

Sorry that I didn't notice this earlier (I disabled my sphinx notification subscriptions a while ago after becoming overwhelmed) - it is now reported at #12038.

@jayaddison
Copy link
Contributor

About the Python3.13 test failures:

23 Mar 2024, 16:25
@[email protected]
Launchpad is down due to unexpected hardware issues and our SREs are working to fix it.

@jayaddison
Copy link
Contributor

About the Python3.13 test failures:

23 Mar 2024, 16:25
@[email protected]
Launchpad is down due to unexpected hardware issues and our SREs are working to fix it.

The PPA functionality of Launchpad appears to be restored; I'm not yet certain about the status of their other services.

Co-authored-by: James Addison <[email protected]>
@jayaddison
Copy link
Contributor

The output from the latest commit at 032bf8c appears to solve the problem in the minimal-repro case:

image

@jayaddison
Copy link
Contributor

(oops; I'm not claiming that that commit fixed it -- it's the one the screenshot was taken from though)

@picnixz
Copy link
Member Author

picnixz commented Mar 23, 2024

I'll review a last time tomorrow when I'm on Linux before merging it.

@picnixz picnixz removed the request for review from AA-Turner March 23, 2024 23:49
picnixz added 3 commits April 24, 2024 09:23
…display-short-literal

# Conflicts:
#	CHANGES.rst
#	sphinx/util/inspect.py
#	sphinx/util/typing.py
@picnixz picnixz marked this pull request as ready for review April 24, 2024 09:00
@picnixz
Copy link
Member Author

picnixz commented Jul 14, 2024

I'll need to solve those conflicts in my IDE because it'll be too hard otherwise.

picnixz added 2 commits July 20, 2024 13:24
…display-short-literal

# Conflicts:
#	sphinx/ext/autodoc/__init__.py
#	sphinx/util/typing.py
@AA-Turner AA-Turner changed the title [autodoc] add support for python_display_short_literal autodoc: add support for python_display_short_literal Jan 30, 2025
@AA-Turner AA-Turner added this to the 8.2.0 milestone Jan 30, 2025
# Conflicts:
#	CHANGES.rst
#	sphinx/ext/autodoc/__init__.py
#	sphinx/ext/autodoc/typehints.py
#	sphinx/ext/napoleon/docstring.py
#	sphinx/util/inspect.py
#	sphinx/util/typing.py
#	tests/test_extensions/test_ext_autodoc.py
@AA-Turner
Copy link
Member

I've simplified the design to add a short_literals argument instead of the more complex RenderMode changes, which we can revisit in a dedicated PR.

A

@AA-Turner AA-Turner dismissed a stale review February 2, 2025 22:32

spam

@AA-Turner AA-Turner merged commit 1b83e55 into sphinx-doc:master Feb 2, 2025
23 checks passed
@picnixz picnixz deleted the fix/11995-python-display-short-literal branch February 2, 2025 22:51
@picnixz
Copy link
Member Author

picnixz commented Feb 2, 2025

I'm fine with this alternative!

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

Successfully merging this pull request may close these issues.

Config option python_display_short_literal_types not working
3 participants