Skip to content

Commit 94a5ecb

Browse files
committed
feat(credentials): fix pr feedbacks (#7850)
1 parent 20d547d commit 94a5ecb

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

pyoaev/contracts/contract_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from typing import Dict, List, Optional
66

77
from pyoaev import utils
8-
from pyoaev.credential.types import CredentialType
98
from pyoaev.contracts.contract_utils import ContractCardinality, ContractVariable
109
from pyoaev.contracts.variable_helper import VariableHelper
10+
from pyoaev.credential.types import CredentialType
1111

1212

1313
class SupportedLanguage(str, Enum):

pyoaev/credential/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from pyoaev.contracts.contract_config import ContractReferencedCredential
1212
from pyoaev.credential.types import CredentialType
1313

14-
1514
_PROVIDER_TO_CREDENTIAL_TYPE = {
1615
"aws": CredentialType.CLOUD_AWS,
1716
"eks": CredentialType.CLOUD_AWS,
@@ -29,7 +28,7 @@ def build_single_referenced_credential_element(
2928
provider_name: str,
3029
) -> ContractReferencedCredential:
3130
"""Build a credential-reference field for a provider-specific contract
32-
with multiple value at False.
31+
with ``multiple`` value at ``False``.
3332
3433
This is the centralized entry point injectors should use when they need the
3534
OpenAEV inject form to ask for one referenced credential. The helper keeps

test/credential/test_credential_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_package_public_helper_builds_the_same_field(self):
4747
self.assertIsInstance(field, ContractReferencedCredential)
4848
self.assertEqual(field.credential_reference_type, CredentialType.CLOUD_AZURE)
4949
self.assertEqual(_serialize(field)["credential_reference_type"], "CLOUD_AZURE")
50+
self.assertFalse(field.multiple)
5051

5152
def test_unknown_provider_leaves_credential_type_empty(self):
5253
field = build_single_referenced_credential_element("openstack")

0 commit comments

Comments
 (0)