summaryrefslogtreecommitdiff
path: root/sphinx/errors.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-07-18 22:49:56 +0100
committerAdam Turner <9087854+aa-turner@users.noreply.github.com>2022-07-18 22:49:56 +0100
commit94024e6efaa23869a6141dba05118c158d3d3f8f (patch)
tree1bfccc5447ca099627c4c31f536d7082b7b9eb6a /sphinx/errors.py
parenta4d41aa889388bf8ee2815d4819235b5ca978a8d (diff)
parenteb0a6c574fd18d5c5d903e5d07cba8cafc376ee0 (diff)
downloadsphinx-git-94024e6efaa23869a6141dba05118c158d3d3f8f.tar.gz
Merge branch '5.x'
# Conflicts: # sphinx/ext/autodoc/__init__.py # sphinx/writers/html5.py
Diffstat (limited to 'sphinx/errors.py')
-rw-r--r--sphinx/errors.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/errors.py b/sphinx/errors.py
index a0263c613..8521010ff 100644
--- a/sphinx/errors.py
+++ b/sphinx/errors.py
@@ -1,6 +1,6 @@
"""Contains SphinxError and a few subclasses."""
-from typing import Any
+from typing import Any, Optional
class SphinxError(Exception):
@@ -39,7 +39,9 @@ class ApplicationError(SphinxError):
class ExtensionError(SphinxError):
"""Extension error."""
- def __init__(self, message: str, orig_exc: Exception = None, modname: str = None) -> None:
+ def __init__(
+ self, message: str, orig_exc: Optional[Exception] = None, modname: Optional[str] = None
+ ) -> None:
super().__init__(message)
self.message = message
self.orig_exc = orig_exc