diff options
| author | Alexandre Flament <alex@al-f.net> | 2022-01-27 23:18:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-27 23:18:41 +0100 |
| commit | 4f82ab36a90db39d21201c11df3f4a437188e8d0 (patch) | |
| tree | 3937ca19529bf38f4d5cd551de3ee81e042bd4b3 /searx/exceptions.py | |
| parent | 5fc53b41f8a0c6e1e1dea02f1427100c0a760beb (diff) | |
| parent | 506169f312735301c1eb3ca8d10dd715298087b3 (diff) | |
Merge pull request #817 from not-my-profile/pyright-01
Pyright 01
Diffstat (limited to 'searx/exceptions.py')
| -rw-r--r-- | searx/exceptions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/exceptions.py b/searx/exceptions.py index 1b106d40c..43c8bab40 100644 --- a/searx/exceptions.py +++ b/searx/exceptions.py @@ -16,6 +16,9 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >. ''' +from typing import Optional, Union + + class SearxException(Exception): pass @@ -35,7 +38,7 @@ class SearxParameterException(SearxException): class SearxSettingsException(SearxException): """Error while loading the settings""" - def __init__(self, message, filename): + def __init__(self, message: Union[str, Exception], filename: Optional[str]): super().__init__(message) self.message = message self.filename = filename |