def get_session_required_import_records(self) -> list[ImportRecord]: """ Get import reciords for `session.py[i]`. """ import_records: set[ImportRecord] = set([ ImportRecord(ImportString("aiobotocore", "client"), "AioBaseClient", "AioBaseClient"), ImportRecord(ImportString("aiobotocore", "client"), "AioClientCreator", "AioClientCreator"), ImportRecord(ImportString("aiobotocore", "credentials"), "AioCredentials", "AioCredentials"), ImportRecord( ImportString("aiobotocore", "credentials"), "create_credential_resolver", "create_credential_resolver", ), ImportRecord( ImportString("aiobotocore", "handlers"), "inject_presigned_url_ec2", "inject_presigned_url_ec2", ), ImportRecord( ImportString("aiobotocore", "handlers"), "inject_presigned_url_rds", "inject_presigned_url_rds", ), ImportRecord( ImportString("aiobotocore", "hooks"), "AioHierarchicalEmitter", "AioHierarchicalEmitter", ), ImportRecord( ImportString("aiobotocore", "parsers"), "AioResponseParserFactory", "AioResponseParserFactory", ), ImportRecord( ImportString("aiobotocore", "signers"), "add_generate_db_auth_token", "add_generate_db_auth_token", ), ImportRecord( ImportString("aiobotocore", "signers"), "add_generate_presigned_post", "add_generate_presigned_post", ), ImportRecord( ImportString("aiobotocore", "signers"), "add_generate_presigned_url", "add_generate_presigned_url", ), ImportRecord(ImportString("botocore", "model"), "ServiceModel"), ImportRecord(ImportString("botocore", "session"), "Session"), ImportRecord(ImportString("typing"), "Any"), ImportRecord(ImportString("typing"), "List"), ImportRecord(ImportString("sys")), TypeLiteral.get_typing_import_record(), ]) import_records.update(self.session_class.get_required_import_records()) return list(sorted(import_records))
def get_init_required_import_records(self) -> list[ImportRecord]: """ Get import records for `__init__.py[i]`. """ import_records: set[ImportRecord] = set([ ImportRecord(ImportString("logging")), ImportRecord(ImportString("typing"), "Any"), ImportRecord(ImportString("sys")), ImportRecord(ImportString("importlib", "util")), ImportRecord(ImportString("boto3", "session"), alias="session"), ImportRecord(ImportString("boto3", "session"), "Session"), TypeLiteral.get_typing_import_record(), ]) for init_function in self.init_functions: import_records.update(init_function.get_required_import_records()) return list(sorted(import_records))
def get_session_required_import_records(self) -> list[ImportRecord]: """ Get import reciords for `session.py[i]`. """ import_records: set[ImportRecord] = set([ ImportRecord(ImportString("sys")), ImportRecord(ImportString("typing"), "Any"), ImportRecord(ImportString("typing"), "List"), ImportRecord(ImportString("typing"), "Optional"), ImportRecord(ImportString("boto3")), ImportRecord(ImportString("boto3", "utils")), ImportRecord(ImportString("boto3", "resources", "factory"), "ResourceFactory"), ImportRecord( ImportString("boto3", "exceptions"), "ResourceNotExistsError", "ResourceNotExistsError", ), ImportRecord( ImportString("boto3", "exceptions"), "UnknownAPIVersionError", "UnknownAPIVersionError", ), ImportRecord(ImportString("botocore", "session")), ImportRecord(ImportString("botocore", "credentials"), "Credentials"), ImportRecord(ImportString("botocore", "loaders"), "Loader"), ImportRecord(ImportString("botocore", "model"), "ServiceModel", "ServiceModel"), ImportRecord(ImportString("botocore", "session"), "Session", "BotocoreSession"), ImportRecord(ImportString("botocore", "client"), "Config"), ImportRecord(ImportString("botocore", "exceptions"), "DataNotFoundError", "DataNotFoundError"), ImportRecord( ImportString("botocore", "exceptions"), "UnknownServiceError", "UnknownServiceError", ), TypeLiteral.get_typing_import_record(), ]) import_records.update(self.session_class.get_required_import_records()) return list(sorted(import_records))