diff options
author | danieleades <33452915+danieleades@users.noreply.github.com> | 2023-05-12 23:50:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 23:50:44 +0100 |
commit | 1c5158e01095a59550ba74f362cf1f024073922a (patch) | |
tree | ce88b9452403c7a56b56b4eb4b943d1695d1e5e5 | |
parent | 2c58722627f1f88729c256b70faa466c3a626825 (diff) | |
download | sphinx-git-1c5158e01095a59550ba74f362cf1f024073922a.tar.gz |
Remove 'sphinx.ext.duration' from the mypy whitelist (#11404)
-rw-r--r-- | pyproject.toml | 1 | ||||
-rw-r--r-- | sphinx/ext/duration.py | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/pyproject.toml b/pyproject.toml index 7cc531bb8..3b94db137 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -330,7 +330,6 @@ module = [ "sphinx.ext.autosummary", "sphinx.ext.autosummary.generate", "sphinx.ext.doctest", - "sphinx.ext.duration", "sphinx.ext.graphviz", "sphinx.ext.inheritance_diagram", "sphinx.ext.intersphinx", diff --git a/sphinx/ext/duration.py b/sphinx/ext/duration.py index 749e2910b..154412441 100644 --- a/sphinx/ext/duration.py +++ b/sphinx/ext/duration.py @@ -57,7 +57,7 @@ def on_source_read(app: Sphinx, docname: str, content: list[str]) -> None: def on_doctree_read(app: Sphinx, doctree: nodes.document) -> None: """Record a reading duration.""" - started_at = app.env.temp_data.get('started_at') + started_at = app.env.temp_data['started_at'] duration = datetime.now() - started_at domain = cast(DurationDomain, app.env.get_domain('duration')) domain.note_reading_duration(duration) |