Function for understanding if the script is using boto3 or not
(obj)
| 15 | |
| 16 | |
| 17 | def is_boto3_client(obj): |
| 18 | """ |
| 19 | Function for understanding if the script is using boto3 or not |
| 20 | """ |
| 21 | import sys |
| 22 | |
| 23 | boto3_module = sys.modules.get("boto3") |
| 24 | |
| 25 | if boto3_module: |
| 26 | try: |
| 27 | from botocore.client import BaseClient |
| 28 | |
| 29 | return isinstance(obj, BaseClient) |
| 30 | except (AttributeError, ImportError): |
| 31 | return False |
| 32 | return False |
| 33 | |
| 34 | |
| 35 | def safe_deepcopy(obj: Any) -> Any: |