File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
codesectools/sasts/tools/Cppcheck Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 55format used by CodeSecTools.
66"""
77
8+ from __future__ import annotations
9+
810import json
911from pathlib import Path
10- from typing import Self
12+ from typing import TYPE_CHECKING , Self
1113
1214from codesectools .sasts .core .parser import AnalysisResult , Defect
1315from codesectools .shared .cwe import CWE , CWEs
1416from codesectools .utils import MissingFile
1517
18+ if TYPE_CHECKING :
19+ from lxml .etree import ElementTree
20+
1621
1722class CppcheckError (Defect ):
1823 """Represent a single error reported by Cppcheck."""
@@ -47,8 +52,6 @@ def __init__(
4752class CppcheckAnalysisResult (AnalysisResult ):
4853 """Represent the complete result of a Cppcheck analysis."""
4954
50- from lxml .etree import ElementTree
51-
5255 def __init__ (self , output_dir : Path , xml_tree : ElementTree , cmdout : dict ) -> None :
5356 """Initialize a CppcheckAnalysisResult instance.
5457
You can’t perform that action at this time.
0 commit comments