Skip to content

Commit af34334

Browse files
committed
Poetry Fixes
1 parent 411bbea commit af34334

File tree

1 file changed

+13
-13
lines changed
  • aws_sra_examples/solutions/patch_mgmt/patch_mgmt_org/lambda/src

1 file changed

+13
-13
lines changed

aws_sra_examples/solutions/patch_mgmt/patch_mgmt_org/lambda/src/app.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ def create_maintenance_window(params: dict, account_id: str, regions: list) -> d
147147
return {"window1_ids": window1_ids, "window2_ids": window2_ids, "window3_ids": window3_ids}
148148

149149

150-
def define_mw_targets(params: dict, window1_id_response: list, window2_id_response: list, window3_id_response: list, account_id: str) -> dict[str,list]:
150+
def define_mw_targets(params: dict, win1_id_resp: list, win2_id_resp: list, win3_id_resp: list, account_id: str) -> dict[str, list]:
151151
"""Define Maintenance Window Targets.
152152
153153
Args:
154154
params (dict): Cloudformation Params
155-
window1_id_response (list): Previous Window 1 IDs for the Targets
156-
window2_id_response (list): Previous Window 2 IDs for the Targets
157-
window3_id_response (list): Previous Window 3 IDs for the Targets
155+
win1_id_resp (list): Previous Window 1 IDs for the Targets
156+
win2_id_resp (list): Previous Window 2 IDs for the Targets
157+
win3_id_resp (list): Previous Window 3 IDs for the Targets
158158
account_id (str): Account ID for the targets to live in
159159
160160
Returns:
@@ -168,7 +168,7 @@ def define_mw_targets(params: dict, window1_id_response: list, window2_id_respon
168168
window1_targets = []
169169
window2_targets = []
170170
window3_targets = []
171-
for response in window1_id_response:
171+
for response in win1_id_resp:
172172
LOGGER.info(f"Maintenance Window Targets {response['region']}")
173173
ssmclient = session.client("ssm", region_name=response["region"], config=boto3_config)
174174

@@ -201,7 +201,7 @@ def define_mw_targets(params: dict, window1_id_response: list, window2_id_respon
201201
"account_id": account_id,
202202
}
203203
)
204-
for response in window2_id_response:
204+
for response in win2_id_resp:
205205
LOGGER.info(f"Maintenance Window Targets {response['region']}")
206206
# Window 2
207207
target_name = params.get("TARGET2_NAME", "")
@@ -228,7 +228,7 @@ def define_mw_targets(params: dict, window1_id_response: list, window2_id_respon
228228
"account_id": account_id,
229229
}
230230
)
231-
for response in window3_id_response:
231+
for response in win3_id_resp:
232232
# Window 3
233233
target_name = params.get("TARGET3_NAME", "")
234234
target_description = params.get("TARGET3_DESCRIPTION", "")
@@ -257,7 +257,7 @@ def define_mw_targets(params: dict, window1_id_response: list, window2_id_respon
257257
return {"window1_targets": window1_targets, "window2_targets": window2_targets, "window3_targets": window3_targets}
258258

259259

260-
def def_mw_tasks( params: dict, window_id_response: dict, window_target_response: dict, account_id: str) -> dict: # noqa: CFQ001
260+
def def_mw_tasks( params: dict, window_id_response: dict, window_target_response: dict, account_id: str) -> dict:# noqa: CFQ001, CCR001
261261
"""Define maintenance window tasks.
262262
263263
Args:
@@ -459,7 +459,7 @@ def parameter_pattern_validator(parameter_name: str, parameter_value: str, patte
459459
if not re.match(pattern, parameter_value):
460460
raise ValueError(f"'{parameter_name}' parameter with value of '{parameter_value}' does not follow the allowed pattern: {pattern}.")
461461

462-
462+
# noqa: CFQ001
463463
def get_validated_parameters(
464464
event: CloudFormationCustomResourceEvent,
465465
) -> dict: # noqa: CCR001 (cognitive complexity), CFQ001
@@ -698,10 +698,10 @@ def process_create_update_event(params: dict, regions: list) -> Dict:
698698
all_window_ids.append(window_ids_raw["window2_ids"])
699699
all_window_ids.append(window_ids_raw["window3_ids"])
700700
window_target_response = define_mw_targets(
701-
params,
702-
window_ids_raw["window1_ids"],
703-
window_ids_raw["window2_ids"],
704-
window_ids_raw["window3_ids"],
701+
params,
702+
window_ids_raw["window1_ids"],
703+
window_ids_raw["window2_ids"],
704+
window_ids_raw["window3_ids"],
705705
account_id)
706706
all_window_targets.append(window_target_response)
707707
all_window_tasks.append(def_mw_tasks(params, window_ids_raw, window_target_response, account_id))

0 commit comments

Comments
 (0)