2021.10 #41

Merged
edraft merged 53 commits from 2021.10 into master 2021-10-04 09:32:42 +02:00
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 45733b30ef - Show all commits

View File

@ -1,5 +1,12 @@
from cpl_query.exceptions import ArgumentNoneException, ExceptionArgument
from cpl_query.extension.iterable_abc import IterableABC from cpl_query.extension.iterable_abc import IterableABC
def contains_query(_list: IterableABC, value: object) -> bool: def contains_query(_list: IterableABC, _value: object) -> bool:
return value in _list if _list is None:
raise ArgumentNoneException(ExceptionArgument.list)
if _value is None:
raise ArgumentNoneException(ExceptionArgument.value)
return _value in _list

View File

@ -6,6 +6,7 @@ class ExceptionArgument(Enum):
list = 'list' list = 'list'
func = 'func' func = 'func'
type = 'type' type = 'type'
value = 'value'
# exceptions # exceptions