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

Sphinx cleanups, bump version requirements, typecheck docs source files #2909

Merged
merged 3 commits into from
Dec 21, 2023

Conversation

jakkdl
Copy link
Member

@jakkdl jakkdl commented Dec 20, 2023

I was struggling with sphinx in #2898 and noticed that sphinx was pinned to an ancient version, and unpinning & updating it seemed to fix a couple of them. My struggles also made me understand sphinx innards better than I had before, so could fix a bunch of references at the same time.

  • add missing type annotations to docs/source/*.py
  • specify files to check with mypy in pyproject.toml (docs/source/typevars.py was typed already, but not checked in CI)
  • change sphinx version limits to >5.3
  • clean up & fix a bunch of references in sphinx
  • add comment explaining workarounds

let's see if RTD manages this as well

…eck with mypy in pyproject.toml, change sphinx version limits to >5.3, clean up & fix a bunch of references in sphinx, add comment explaining workarounds
Copy link

codecov bot commented Dec 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d4ce2f9) 99.49% compared to head (52ddc6c) 99.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2909      +/-   ##
==========================================
+ Coverage   99.49%   99.66%   +0.16%     
==========================================
  Files         115      115              
  Lines       17704    17667      -37     
  Branches     3158     3157       -1     
==========================================
- Hits        17615    17608       -7     
+ Misses         70       40      -30     
  Partials       19       19              

see 4 files with indirect coverage changes

@@ -41,6 +49,20 @@
check=True,
)

# Sphinx is very finicky, and somewhat buggy, so we have several different
# methods to help it resolve links.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to mention the typevar module also, which redirects typing_extensionstyping, and all typevars to typing.TypeVar etc.

Copy link
Member

@CoolCat467 CoolCat467 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I'm hopeful this will help with working with sphinx in the future, it's errors are confusing to me!

@CoolCat467 CoolCat467 added docs dependencies Pull requests that update a dependency file typing Adding static types to trio's interface labels Dec 20, 2023
@jakkdl jakkdl requested a review from TeamSpen210 December 21, 2023 10:35
@jakkdl jakkdl merged commit 973b07e into python-trio:master Dec 21, 2023
29 checks passed
@jakkdl jakkdl deleted the bump_sphinx branch December 21, 2023 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file docs typing Adding static types to trio's interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants