From 858aab4eaca010bf49dc99541586ae41635ec178 Mon Sep 17 00:00:00 2001 From: skyuecx0630 <48788794+skyuecx0630@users.noreply.github.com> Date: Mon, 12 Aug 2024 19:50:36 +0900 Subject: [PATCH] Check if conditions in more pythonic ways --- services/codeseries.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/codeseries.py b/services/codeseries.py index 5cd05bc..527c826 100644 --- a/services/codeseries.py +++ b/services/codeseries.py @@ -15,7 +15,7 @@ def codebuild_project_environment_privileged_check(): for project in projects: project = build_client.batch_get_projects(names=[project])["projects"][0] - if project["environment"]["privilegedMode"] != True: + if not project["environment"]["privilegedMode"]: compliant_resources.append(project["arn"]) else: non_compliant_resources.append(project["arn"]) @@ -61,8 +61,8 @@ def codedeploy_auto_rollback_monitor_enabled(): )["deploymentGroupInfo"] if ( - deployment_group["alarmConfiguration"]["enabled"] == True - and deployment_group["autoRollbackConfiguration"]["enabled"] == True + deployment_group["alarmConfiguration"]["enabled"] + and deployment_group["autoRollbackConfiguration"]["enabled"] ): compliant_resources.append(deployment_group["deploymentGroupId"]) else: