Common: Simplify _make_credentials()
This commit is contained in:
parent
9e7963afc0
commit
acf12c2de1
|
@ -57,13 +57,11 @@ class CredentialsSchema(Schema):
|
||||||
if not any(credentials.values()):
|
if not any(credentials.values()):
|
||||||
raise InvalidCredentialsError("At least one credentials component must be defined")
|
raise InvalidCredentialsError("At least one credentials component must be defined")
|
||||||
|
|
||||||
parsed_credentials = {
|
return {
|
||||||
key: CredentialsSchema._build_credential_component(credential_component_mapping)
|
key: CredentialsSchema._build_credential_component(credential_component_mapping)
|
||||||
for key, credential_component_mapping in credentials.items()
|
for key, credential_component_mapping in credentials.items()
|
||||||
}
|
}
|
||||||
|
|
||||||
return parsed_credentials
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _build_credential_component(
|
def _build_credential_component(
|
||||||
credential_component: CredentialComponentMapping,
|
credential_component: CredentialComponentMapping,
|
||||||
|
|
Loading…
Reference in New Issue