File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -50,20 +50,22 @@ def add_unfixed_findings(
5050 ]
5151 )
5252
53- def get_findings_for_location (self , line_number : int ):
53+ def get_findings_for_location (self , line_number : int ) -> list [ Finding ] :
5454 return [
5555 result .finding
5656 for result in (self .results or [])
57- if any (
58- location .start .line <= line_number <= location .end .line
59- for location in result .locations
60- )
61- or any (
62- location .start .line <= line_number <= location .end .line
63- for codeflow in result .codeflows
64- for location in codeflow
57+ if result .finding is not None
58+ and (
59+ any (
60+ location .start .line <= line_number <= location .end .line
61+ for location in result .locations
62+ )
63+ or any (
64+ location .start .line <= line_number <= location .end .line
65+ for codeflow in result .codeflows
66+ for location in codeflow
67+ )
6568 )
66- and result .finding is not None
6769 ]
6870
6971 def match_findings (self , line_numbers ):
You can’t perform that action at this time.
0 commit comments