add a matching Not() type - to invert other criteria
This commit is contained in:
parent
f7ad037934
commit
c139879670
1 changed files with 5 additions and 0 deletions
|
@ -47,3 +47,8 @@ class Literal(ResponseParam):
|
||||||
self._value = value
|
self._value = value
|
||||||
def match(self, arg: str) -> bool:
|
def match(self, arg: str) -> bool:
|
||||||
return self._value == arg
|
return self._value == arg
|
||||||
|
class Not(ResponseParam):
|
||||||
|
def __init__(self, param: ResponseParam):
|
||||||
|
self._param = param
|
||||||
|
def match(self, arg: str) -> bool:
|
||||||
|
return not self._param.match(arg)
|
||||||
|
|
Loading…
Reference in a new issue