Skip to content

Commit

Permalink
feat: reimplement builder
Browse files Browse the repository at this point in the history
  • Loading branch information
1101-1 committed Oct 18, 2024
1 parent e50938e commit 6120e6b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/aws/fix_plugin_aws/resource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ def __init__(
graph_nodes_access: Optional[RWLock] = None,
graph_edges_access: Optional[RWLock] = None,
last_run_started_at: Optional[datetime] = None,
assessment_findings: Optional[Dict[Tuple[str, str, str], Dict[str, List[Finding]]]] = None,
) -> None:
self.graph = graph
self.cloud = cloud
Expand All @@ -503,8 +504,8 @@ def __init__(
self.last_run_started_at = last_run_started_at
self.created_at = utc()
self.__builder_cache = {region.safe_name: self}
self._assessment_findings: Dict[Tuple[str, str, str], Dict[str, List[Finding]]] = defaultdict(
lambda: defaultdict(list)
self._assessment_findings: Dict[Tuple[str, str, str], Dict[str, List[Finding]]] = (
assessment_findings or defaultdict(lambda: defaultdict(list))
)
"""
AWS assessment findings that hold a list of AwsInspectorFinding or AwsGuardDutyFinding.
Expand Down Expand Up @@ -754,6 +755,7 @@ def for_region(self, region: AwsRegion) -> GraphBuilder:
self.graph_nodes_access,
self.graph_edges_access,
self.last_run_started_at,
self._assessment_findings,
)
self.__builder_cache[region.safe_name] = builder
return builder

0 comments on commit 6120e6b

Please sign in to comment.