Skip to content

Commit 3e55596

Browse files
committed
Add function annotations
1 parent 202cd0f commit 3e55596

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pathvalidate/error.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
@enum.unique
1212
class ErrorReason(enum.Enum):
13+
FOUND_ABS_PATH = "FOUND_ABS_PATH"
1314
NULL_NAME = "NULL_NAME"
1415
INVALID_CHARACTER = "INVALID_CHARACTER"
1516
INVALID_LENGTH = "INVALID_LENGTH"
@@ -45,11 +46,11 @@ def __init__(self, *args, **kwargs):
4546
self.__reusable_name = kwargs.pop("reusable_name", None)
4647

4748
try:
48-
super(ValidationError, self).__init__(*args[0], **kwargs)
49+
super(ValidationError, self).__init__(*args[0], **kwargs)
4950
except IndexError:
5051
super(ValidationError, self).__init__(*args, **kwargs)
5152

52-
def __str__(self):
53+
def __str__(self) -> str:
5354
item_list = []
5455

5556
if Exception.__str__(self):
@@ -86,7 +87,7 @@ class InvalidCharError(ValidationError):
8687
Exception raised when includes invalid character(s) within a string.
8788
"""
8889

89-
def __init__(self, *args, **kwargs):
90+
def __init__(self, *args, **kwargs) -> None:
9091
kwargs["reason"] = ErrorReason.INVALID_CHARACTER
9192

9293
super(InvalidCharError, self).__init__(args, **kwargs)

0 commit comments

Comments
 (0)