From 31f6db3c5c2c807b8573f6250badaf126125c599 Mon Sep 17 00:00:00 2001 From: sureshcsdp <241378668+sureshcsdp@users.noreply.github.com> Date: Mon, 23 Feb 2026 23:21:39 +0000 Subject: [PATCH 1/2] Fix AWS cloudshell Python version issue --- cleancloud/providers/aws/session.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cleancloud/providers/aws/session.py b/cleancloud/providers/aws/session.py index 343ebbe..38f18b9 100644 --- a/cleancloud/providers/aws/session.py +++ b/cleancloud/providers/aws/session.py @@ -1,8 +1,10 @@ +from typing import Optional + import boto3 from boto3.session import Session -def create_aws_session(profile: str | None, region: str) -> Session: +def create_aws_session(profile: Optional[str], region: str) -> Session: if profile: return boto3.Session(profile_name=profile, region_name=region) From c99e25c13f0ce31bc7e79d06e53827abad5d3986 Mon Sep 17 00:00:00 2001 From: sureshcsdp <241378668+sureshcsdp@users.noreply.github.com> Date: Mon, 23 Feb 2026 23:24:31 +0000 Subject: [PATCH 2/2] more --- cleancloud/providers/aws/rules/rds_idle.py | 4 ++-- cleancloud/providers/azure/rules/sql_database_idle.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cleancloud/providers/aws/rules/rds_idle.py b/cleancloud/providers/aws/rules/rds_idle.py index 83c3091..bc47c2e 100644 --- a/cleancloud/providers/aws/rules/rds_idle.py +++ b/cleancloud/providers/aws/rules/rds_idle.py @@ -1,5 +1,5 @@ from datetime import datetime, timedelta, timezone -from typing import List +from typing import List, Optional import boto3 from botocore.exceptions import ClientError @@ -236,7 +236,7 @@ def _estimate_monthly_cost(instance_class: str, multi_az: bool) -> str: return "Cost varies by instance class (region dependent)" -def _estimate_monthly_cost_usd(instance_class: str, multi_az: bool) -> float | None: +def _estimate_monthly_cost_usd(instance_class: str, multi_az: bool) -> Optional[float]: """Numeric monthly cost estimate for aggregation.""" cost_map = { "db.t3.micro": 12, diff --git a/cleancloud/providers/azure/rules/sql_database_idle.py b/cleancloud/providers/azure/rules/sql_database_idle.py index f7484a4..b05ac1c 100644 --- a/cleancloud/providers/azure/rules/sql_database_idle.py +++ b/cleancloud/providers/azure/rules/sql_database_idle.py @@ -220,7 +220,7 @@ def _estimate_monthly_cost(sku_name: str) -> str: return "Cost varies by SKU (region dependent)" -def _estimate_monthly_cost_usd(sku_name: str) -> float | None: +def _estimate_monthly_cost_usd(sku_name: str) -> Optional[float]: """Numeric monthly cost estimate for aggregation.""" if not sku_name: return None