Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Aug 15, 2024
1 parent a700d08 commit b17b0f0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions plugins/module_utils/linode_common_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class InfoModuleParamGroupPolicy(Enum):
Defines the policies that can be set for a param group.
"""

exactly_one_of = "exactly_one_of"
EXACTLY_ONE_OF = "exactly_one_of"


class InfoModuleParamGroup:
Expand Down Expand Up @@ -227,7 +227,7 @@ def spec(self):
description=f"The ID of the {param.display_name} for this resource.",
)

if InfoModuleParamGroupPolicy.exactly_one_of in group.policies:
if InfoModuleParamGroupPolicy.EXACTLY_ONE_OF in group.policies:
param_spec.conflicts_with = param_names ^ {param.name}
param_spec.required = False

Expand Down Expand Up @@ -287,7 +287,7 @@ def run(self) -> None:
base_module_args["mutually_exclusive"].append(attribute_names)

for entry in self.param_groups:
if InfoModuleParamGroupPolicy.exactly_one_of in entry.policies:
if InfoModuleParamGroupPolicy.EXACTLY_ONE_OF in entry.policies:
param_names = [param.name for param in entry.params]
base_module_args["required_one_of"].append(param_names)
base_module_args["mutually_exclusive"].append(param_names)
Expand Down
10 changes: 7 additions & 3 deletions plugins/modules/domain_record_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@

from typing import Any, Dict

import ansible_collections.linode.cloud.plugins.module_utils.doc_fragments.domain_record as docs_parent
import ansible_collections.linode.cloud.plugins.module_utils.doc_fragments.domain_record_info as docs
from ansible_collections.linode.cloud.plugins.module_utils.doc_fragments import (
domain_record as docs_parent,
)
from ansible_collections.linode.cloud.plugins.module_utils.doc_fragments import (
domain_record_info as docs,
)
from ansible_collections.linode.cloud.plugins.module_utils.linode_common_info import (
InfoModule,
InfoModuleAttr,
Expand Down Expand Up @@ -58,7 +62,7 @@ def _domain_from_params(client: LinodeClient, params: Dict[str, Any]) -> Domain:
name="domain",
type=FieldType.string,
),
policies=[InfoModuleParamGroupPolicy.exactly_one_of],
policies=[InfoModuleParamGroupPolicy.EXACTLY_ONE_OF],
)
],
attributes=[
Expand Down

0 comments on commit b17b0f0

Please sign in to comment.