Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions cdmtaskservice/arg_checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@
'''

import datetime
from typing import Any
from typing import TypeVar
import unicodedata

_T = TypeVar("_T")

def not_falsy(obj: Any, name: str):

def not_falsy(obj: _T, name: str) -> _T:
"""
Check an argument is not falsy.

obj - the argument to check.
name - the name of the argument to use in exceptions.

returns the object.
"""
if not obj:
Expand Down
Loading