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

Allow docname to be None in source-read event #59

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ jobs:
python tests/update_submodules.py
- name: Install Python package
env:
# See https://github.com/pypa/wheel/issues/507:
PYTHONWARNINGS: error,ignore:pkg_resources is deprecated:DeprecationWarning
PYTHONWARNINGS: error,default::DeprecationWarning
run: |
python -m pip install .
- name: Install test dependencies
env:
PYTHONWARNINGS: error,default::DeprecationWarning
run: |
python -m pip install -r tests/requirements.txt
- name: Run pytest
Expand Down
3 changes: 3 additions & 0 deletions src/sphinx_last_updated_by_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ def _builder_inited(app):


def _source_read(app, docname, source):
if docname is None:
# This may happen since Sphinx 7.2.0?
return
env = app.env
assert docname not in env.git_last_updated
env.git_last_updated[docname] = None
Expand Down