Skip to content

Commit 95bdd62

Browse files
jlhoodkeetonian
authored andcommitted
fix: use isinstance check instead of type (aws#1411)
1 parent 2e55672 commit 95bdd62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samtranslator/translator/translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _get_function_names(self, resource_dict, intrinsics_resolver):
5151
# adds to the function_names dict with key as the api_name and value as the function_name
5252
if item.get("Type") == "Api" and item.get("Properties") and item.get("Properties").get("RestApiId"):
5353
rest_api = item.get("Properties").get("RestApiId")
54-
if type(rest_api) == dict or isinstance(rest_api, dict):
54+
if isinstance(rest_api, dict):
5555
api_name = item.get("Properties").get("RestApiId").get("Ref")
5656
else:
5757
api_name = item.get("Properties").get("RestApiId")

0 commit comments

Comments
 (0)