2021.10.3 #35
@ -1,5 +1,12 @@
|
||||
from cpl_query.exceptions import ArgumentNoneException, ExceptionArgument
|
||||
from cpl_query.extension.iterable_abc import IterableABC
|
||||
|
||||
|
||||
def contains_query(_list: IterableABC, value: object) -> bool:
|
||||
return value in _list
|
||||
def contains_query(_list: IterableABC, _value: object) -> bool:
|
||||
if _list is None:
|
||||
raise ArgumentNoneException(ExceptionArgument.list)
|
||||
|
||||
if _value is None:
|
||||
raise ArgumentNoneException(ExceptionArgument.value)
|
||||
|
||||
return _value in _list
|
||||
|
@ -6,6 +6,7 @@ class ExceptionArgument(Enum):
|
||||
list = 'list'
|
||||
func = 'func'
|
||||
type = 'type'
|
||||
value = 'value'
|
||||
|
||||
|
||||
# exceptions
|
||||
|
Loading…
Reference in New Issue
Block a user