Repository: PyCQA/eradicate (language: python)

Issue:
Add nosec to whitelist
What about adding `nosec` (https://github.com/PyCQA/bandit) to the whitelist?


Discussion / hints:

Fix patch:
diff --git a/eradicate.py b/eradicate.py
index 2aa9ba8..dbecee0 100644
--- a/eradicate.py
+++ b/eradicate.py
@@ -55,6 +55,7 @@ class Eradicator(object):
         r'pylint',
         r'pyright',
         r'noqa',
+        r'nosec',
         r'type:\s*ignore',
         r'fmt:\s*(on|off)',
         r'TODO',


Test patch:
diff --git a/test_eradicate.py b/test_eradicate.py
index 6b871e9..16fbe7f 100755
--- a/test_eradicate.py
+++ b/test_eradicate.py
@@ -181,6 +181,9 @@ def test_comment_contains_code_with_default_whitelist(self):
         self.assertFalse(eradicate.Eradicator().comment_contains_code(
             '# noqa:A123'))
 
+        self.assertFalse(eradicate.Eradicator().comment_contains_code(
+            '# nosec'))
+
         self.assertFalse(eradicate.Eradicator().comment_contains_code(
             '# fmt: on'))