summaryrefslogtreecommitdiff
path: root/sphinx/project.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/project.py')
-rw-r--r--sphinx/project.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/project.py b/sphinx/project.py
index d993ec504..89e003b22 100644
--- a/sphinx/project.py
+++ b/sphinx/project.py
@@ -4,7 +4,7 @@ from __future__ import annotations
import os
from glob import glob
-from typing import Iterable, Optional
+from typing import Iterable
from sphinx.locale import __
from sphinx.util import logging
@@ -58,7 +58,7 @@ class Project:
return self.docnames
- def path2doc(self, filename: str) -> Optional[str]:
+ def path2doc(self, filename: str) -> str | None:
"""Return the docname for the filename if the file is a document.
*filename* should be absolute or relative to the source directory.