summaryrefslogtreecommitdiff
path: root/sphinx/util/fileutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/fileutil.py')
-rw-r--r--sphinx/util/fileutil.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/util/fileutil.py b/sphinx/util/fileutil.py
index c9c50e84a..03928710e 100644
--- a/sphinx/util/fileutil.py
+++ b/sphinx/util/fileutil.py
@@ -4,7 +4,7 @@ from __future__ import annotations
import os
import posixpath
-from typing import TYPE_CHECKING, Callable, Optional
+from typing import TYPE_CHECKING, Callable
from docutils.utils import relative_path
@@ -17,7 +17,7 @@ if TYPE_CHECKING:
def copy_asset_file(source: str, destination: str,
context: dict | None = None,
- renderer: Optional["BaseRenderer"] = None) -> None:
+ renderer: BaseRenderer | None = None) -> None:
"""Copy an asset file to destination.
On copying, it expands the template variables if context argument is given and
@@ -50,7 +50,7 @@ def copy_asset_file(source: str, destination: str,
def copy_asset(source: str, destination: str, excluded: PathMatcher = lambda path: False,
- context: dict | None = None, renderer: Optional["BaseRenderer"] = None,
+ context: dict | None = None, renderer: BaseRenderer | None = None,
onerror: Callable[[str, Exception], None] | None = None) -> None:
"""Copy asset files to destination recursively.