Skip to content

Commit 767a215

Browse files
committed
More lint
1 parent 94c73a5 commit 767a215

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • libcloudforensics/providers/gcp/internal

libcloudforensics/providers/gcp/internal/compute.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import subprocess
2121
import time
2222
from collections import defaultdict
23-
from typing import Any, Dict, List, Optional, Tuple, TypeVar, TYPE_CHECKING, Union
23+
from typing import Any, cast, Dict, List, Optional, Tuple, TypeVar, TYPE_CHECKING, Union
2424

2525
from googleapiclient.errors import HttpError
2626

@@ -176,7 +176,7 @@ def _GetResourceFromComputeApi(
176176
kwargs['region'] = region
177177

178178
try:
179-
return client.get(**kwargs).execute()
179+
return cast(Dict[str, Any], client.get(**kwargs).execute())
180180
except HttpError as e:
181181
if e.resp.status == 404:
182182
return None
@@ -206,7 +206,7 @@ def _GetResourceFromComputeApi(
206206
for location in response.get('items', {}):
207207
items = response['items'][location].get(res_type_in_resp, [])
208208
if items:
209-
return items[0]
209+
return cast(Dict[str, Any], items[0])
210210
return None
211211

212212

0 commit comments

Comments
 (0)