Skip to content

Commit

Permalink
Oh, pylint, hush
Browse files Browse the repository at this point in the history
  • Loading branch information
sirosen committed Aug 2, 2024
1 parent 872bf72 commit b8370a4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/globus_sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,20 @@ def check_uuid(s: UUIDLike, *, name: str) -> t.Literal[True]:
"""
Raise an error if the input is not a UUID
:param s: the UUID|str value
:param name: the name for this value to use in error messages
:raises TypeError: if the input is not a UUID|str
:raises ValueError: if the input is a non-UUID str
Example usage:
.. code-block:: python
def frob_it(collection_id: UUIDLike) -> Frob:
utils.check_uuid(collection_id, name="collection_id")
return Frob(collection_id)
"""
if isinstance(s, uuid.UUID):
return True
Expand Down

0 comments on commit b8370a4

Please sign in to comment.