88import shutil
99from datetime import datetime , timedelta
1010from pathlib import Path
11- from typing import Optional
11+ from typing import Dict , List , Optional # noqa: UP035
1212
1313from rich import print as rprint
1414
@@ -153,7 +153,7 @@ def _get_cache_info_with_metadata(self, cache_dir: Path) -> Optional[dict]:
153153 info ["size_mb" ] = self ._calculate_cache_size_mb (cache_dir )
154154 return info
155155
156- def list_cached_frontends (self ) -> list [ dict ]:
156+ def list_cached_frontends (self ) -> List [ Dict ]: # noqa: UP006
157157 """List all cached frontend PRs."""
158158 frontend_cache = self .cache_dir / "frontend"
159159 if not frontend_cache .exists ():
@@ -177,7 +177,7 @@ def _is_cache_expired(self, cached_at: str) -> bool:
177177 except (ValueError , TypeError ):
178178 return True # Consider invalid timestamps as expired
179179
180- def _get_expired_items (self , cached_items : list [ dict ]) -> list [ dict ]:
180+ def _get_expired_items (self , cached_items : List [ Dict ]) -> List [ Dict ]: # noqa: UP006
181181 """Get list of expired cache items."""
182182 expired = []
183183 for item in cached_items :
@@ -186,7 +186,7 @@ def _get_expired_items(self, cached_items: list[dict]) -> list[dict]:
186186 expired .append (item )
187187 return expired
188188
189- def _get_excess_items (self , cached_items : list [ dict ], expired_items : list [ dict ]) -> list [ dict ]:
189+ def _get_excess_items (self , cached_items : List [ Dict ], expired_items : List [ Dict ]) -> List [ Dict ]: # noqa: UP006
190190 """Get list of items that exceed the maximum cache limit."""
191191 remaining_items = [item for item in cached_items if item not in expired_items ]
192192 if len (remaining_items ) > self .max_cache_items :
0 commit comments