Skip to content

Commit 43b51dc

Browse files
committed
Add missing logical NOT operator (~)
1 parent 4fd4d5a commit 43b51dc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pylint_secure_coding_standard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def _is_yaml_unsafe_call(node):
283283

284284
# ==============================================================================
285285

286-
_unop = {'-': operator.neg, 'not': operator.not_}
286+
_unop = {'-': operator.neg, 'not': operator.not_, '~': operator.inv}
287287
_binop = {
288288
'+': operator.add,
289289
'-': operator.sub,

tests/os_chmod_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def test_chmod_get_mode_invalid(self, s):
5555
's, expected',
5656
(
5757
('-stat.S_IREAD', -stat.S_IREAD),
58+
('~stat.S_IREAD', ~stat.S_IREAD),
5859
('not stat.S_IREAD', not stat.S_IREAD),
5960
),
6061
)

0 commit comments

Comments
 (0)