Skip to content

Commit

Permalink
testing fixes for PyCQA#1003
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuczer committed Apr 4, 2023
1 parent d2e5bea commit cd72d14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bandit/core/utils.py
Expand Up @@ -373,8 +373,8 @@ def check_ast_node(name):


def get_nosec(nosec_lines, context):
for lineno in context["linerange"]:
nosec = nosec_lines.get(lineno, None)
for lineno in [context["lineno"], *context["linerange"]]:
nosec = nosec_lines.get(lineno)
if nosec is not None:
return nosec
return None

0 comments on commit cd72d14

Please sign in to comment.