Skip to content

Commit 7e9112d

Browse files
author
esblinov
committed
Remove redundant # type: ignore[operator] comments from lock protocol
tests
1 parent a005810 commit 7e9112d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/units/protocols/test_async_context_lock.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ def test_not_implemented_methods_for_async_context_lock_protocol(): # type: ign
5050
class AsyncContextLockProtocolImplementation(AsyncContextLockProtocol):
5151
pass
5252

53-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
53+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
5454
AsyncContextLockProtocolImplementation().acquire()
5555

56-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
56+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
5757
AsyncContextLockProtocolImplementation().release()
5858

59-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
59+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
6060
AsyncContextLockProtocolImplementation().__aenter__()
6161

62-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
62+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
6363
AsyncContextLockProtocolImplementation().__aexit__(None, None, None)
6464

6565

tests/units/protocols/test_context_lock.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ def test_not_implemented_methods_for_context_lock_protocol(): # type: ignore[no
6060
class ContextLockProtocolImplementation(ContextLockProtocol):
6161
pass
6262

63-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
63+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
6464
ContextLockProtocolImplementation().acquire()
6565

66-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
66+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
6767
ContextLockProtocolImplementation().release()
6868

69-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
69+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
7070
ContextLockProtocolImplementation().__enter__()
7171

72-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
72+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
7373
ContextLockProtocolImplementation().__exit__(None, None, None)
7474

7575

tests/units/protocols/test_lock.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ def test_not_implemented_methods_for_lock_protocol(): # type: ignore[no-untyped
4141
class LockProtocolImplementation(LockProtocol):
4242
pass
4343

44-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
44+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
4545
LockProtocolImplementation().acquire()
4646

47-
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')): # type: ignore[operator]
47+
with pytest.raises(NotImplementedError, match=match('Do not use the protocol as a lock.')):
4848
LockProtocolImplementation().release()
4949

5050

0 commit comments

Comments
 (0)