-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37fada4
commit 06b4aee
Showing
2 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
Validation of the `comment` attribute | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
|
||
def validate_comment(comment: str) -> None: | ||
""" | ||
Validate the comment value | ||
Parameters | ||
---------- | ||
comment | ||
Tracking ID value to validate | ||
Raises | ||
------ | ||
TypeError | ||
`comment`'s value is not a string | ||
""" | ||
if not isinstance(comment, str): | ||
msg = f"The `comment` attribute must be a string, received {comment=!r}." | ||
raise TypeError(msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters