diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2023-01-02 00:01:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 00:01:14 +0000 |
commit | 4032070e8131f518bbb8a04e8d63c5af4df9b59d (patch) | |
tree | 47b14f58d5337448e8358029264ebcd6d1ae7351 /sphinx/util/fileutil.py | |
parent | ede68fa423107fbab74d07b307d7dcb03c00dfbd (diff) | |
download | sphinx-git-4032070e8131f518bbb8a04e8d63c5af4df9b59d.tar.gz |
Run pyupgrade (#11070)
Diffstat (limited to 'sphinx/util/fileutil.py')
-rw-r--r-- | sphinx/util/fileutil.py | 6 |
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. |