summaryrefslogtreecommitdiff
path: root/cmd2/exceptions.py
diff options
context:
space:
mode:
authorEric Lin <anselor@gmail.com>2021-03-15 15:18:29 -0400
committeranselor <anselor@gmail.com>2021-03-18 18:26:20 -0400
commit9d1b7c7f1068ce9b55ba160ebceeadd665d1bc02 (patch)
tree2add05f8f7f955f2ba6aafaa640afccafe8f514a /cmd2/exceptions.py
parentf30627d5d2d0adc7db45aa26956372ea2cb3dc19 (diff)
downloadcmd2-git-9d1b7c7f1068ce9b55ba160ebceeadd665d1bc02.tar.gz
Some mypy validation fixes
Diffstat (limited to 'cmd2/exceptions.py')
-rw-r--r--cmd2/exceptions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd2/exceptions.py b/cmd2/exceptions.py
index b45167d1..011f53bd 100644
--- a/cmd2/exceptions.py
+++ b/cmd2/exceptions.py
@@ -1,6 +1,9 @@
# coding=utf-8
"""Custom exceptions for cmd2"""
+from typing import (
+ Any,
+)
############################################################################################################
# The following exceptions are part of the public API
@@ -49,7 +52,7 @@ class CompletionError(Exception):
- Tab completion hints
"""
- def __init__(self, *args, apply_style: bool = True):
+ def __init__(self, *args: Any, apply_style: bool = True) -> None:
"""
Initializer for CompletionError
:param apply_style: If True, then ansi.style_error will be applied to the message text when printed.
@@ -68,7 +71,7 @@ class PassThroughException(Exception):
This class is used to wrap an exception that should be raised instead of printed.
"""
- def __init__(self, *args, wrapped_ex: BaseException):
+ def __init__(self, *args: Any, wrapped_ex: BaseException) -> None:
"""
Initializer for PassThroughException
:param wrapped_ex: the exception that will be raised