Skip to content

Commit 1c5158e

Browse files
authored
Remove 'sphinx.ext.duration' from the mypy whitelist (#11404)
1 parent 2c58722 commit 1c5158e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ module = [
330330
"sphinx.ext.autosummary",
331331
"sphinx.ext.autosummary.generate",
332332
"sphinx.ext.doctest",
333-
"sphinx.ext.duration",
334333
"sphinx.ext.graphviz",
335334
"sphinx.ext.inheritance_diagram",
336335
"sphinx.ext.intersphinx",

sphinx/ext/duration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def on_source_read(app: Sphinx, docname: str, content: list[str]) -> None:
5757

5858
def on_doctree_read(app: Sphinx, doctree: nodes.document) -> None:
5959
"""Record a reading duration."""
60-
started_at = app.env.temp_data.get('started_at')
60+
started_at = app.env.temp_data['started_at']
6161
duration = datetime.now() - started_at
6262
domain = cast(DurationDomain, app.env.get_domain('duration'))
6363
domain.note_reading_duration(duration)

0 commit comments

Comments
 (0)