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

More docs fixes #3326

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

More docs fixes #3326

wants to merge 3 commits into from

Conversation

kurtmckee
Copy link
Contributor

@kurtmckee kurtmckee commented Jul 19, 2024

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

This PR resolves three classes of warnings and errors that Sphinx reports when building the documentation (recent example; click the python -m sphinx accordion to see the details):

  • "Unexpected indentation"
  • "Unexpected unindent"
  • "more than one target for cross-reference 'Redis'"

Note

The test suite is failing due to the release of hiredis 3.0.0, released ~4 hours ago. The failures are unrelated to this PR. See #3327.


Warning

This work revealed a significant problem that flake8 reported exactly once but then failed to ever report again on subsequent runs (and fails to report in CI, as well)!

The Script class is defined twice in redis/commands/core.py, at lines 5462 and 6286:

class Script:

class Script:

git blame shows that both definitions were created on 2022-02-22, by different authors, within 1.5 hours of each other. I intend to submit a PR to delete the first definition.

…ings

When Sphinx runs, `TYPE_CHECKING` is not enabled,
so the differentiating sync/async `Redis` imports don't happen,
and Sphinx appears to be unable to infer which class
`"Redis"` should cross-reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant