mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-26 09:08:25 -05:00
Make Not and NotIn namedtuples
This commit is contained in:
@@ -113,7 +113,7 @@ def test_not(val, expected):
|
||||
(('bar', True), ('foo', False), (MISSING, False)),
|
||||
)
|
||||
def test_not_in(values, expected):
|
||||
compared = NotIn(('baz', 'foo'))
|
||||
compared = NotIn('baz', 'foo')
|
||||
assert (values == compared) is expected
|
||||
assert (compared == values) is expected
|
||||
|
||||
@@ -211,7 +211,7 @@ map_conditional_absent_not_in = Map(
|
||||
'foo', 'key',
|
||||
Conditional(
|
||||
'key2', check_bool,
|
||||
condition_key='key', condition_value=NotIn((1, 2)), ensure_absent=True,
|
||||
condition_key='key', condition_value=NotIn(1, 2), ensure_absent=True,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user