Skip to content

Commit

Permalink
Cleanup importing
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Dec 18, 2024
1 parent 6ba216e commit 12cf66e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/cfnlint/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
from cfnlint.decode.decode import decode_str
from cfnlint.helpers import REGION_PRIMARY, REGIONS
from cfnlint.rules import Match, RulesCollection
from cfnlint.runner import Runner
from cfnlint.runner.template import run_template_by_data
from cfnlint.runner import Runner, run_template_by_data

Matches = List[Match]

Expand Down
10 changes: 8 additions & 2 deletions src/cfnlint/rules/parameters/DeploymentParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ class DeploymentParameters(CfnLintJsonSchema):
"""Check if Parameters are configured correctly"""

id = "E2900"
shortdesc = "Parameters have appropriate properties"
description = "Making sure the parameters are properly configured"
shortdesc = (
"Validate deployment file parameters are valid against template parameters"
)
description = (
"Validates that required properties are provided, allowed values are "
"valid, types are correct, and the pattern matches in a deployment file "
"for the parameters specified in a template"
)
source_url = "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html"
tags = ["parameters"]

Expand Down
18 changes: 17 additions & 1 deletion src/cfnlint/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
SPDX-License-Identifier: MIT-0
"""

__all__ = ["main", "Runner"]
__all__ = [
"main",
"Runner",
"run_template_by_data",
"run_template_by_file_path",
"run_deployment_file",
"CfnLintExitException",
"InvalidRegionException",
"UnexpectedRuleException",
]

from cfnlint.runner.cli import Runner, main
from cfnlint.runner.deployment_file import run_deployment_file
from cfnlint.runner.exceptions import (
CfnLintExitException,
InvalidRegionException,
UnexpectedRuleException,
)
from cfnlint.runner.template import run_template_by_data, run_template_by_file_path
4 changes: 4 additions & 0 deletions src/cfnlint/runner/deployment_file/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""

__all__ = ["run_deployment_file"]

from cfnlint.runner.deployment_file.runner import run_deployment_file
2 changes: 1 addition & 1 deletion test/unit/module/rule/test_rule_child.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from cfnlint import ConfigMixIn
from cfnlint.decode.decode import decode_str
from cfnlint.rules import CloudFormationLintRule, Match, RuleMatch, Rules
from cfnlint.runner.template import run_template_by_data
from cfnlint.runner import run_template_by_data


class TestCloudFormationRuleChild(BaseTestCase):
Expand Down
3 changes: 1 addition & 2 deletions test/unit/module/runner/test_rule_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from test.testlib.testcase import BaseTestCase

from cfnlint.config import ConfigMixIn
from cfnlint.runner import Runner
from cfnlint.runner.exceptions import UnexpectedRuleException
from cfnlint.runner import Runner, UnexpectedRuleException


class TestGetRules(BaseTestCase):
Expand Down
2 changes: 1 addition & 1 deletion test/unit/module/runner/test_template_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from cfnlint import ConfigMixIn
from cfnlint.config import _DEFAULT_RULESDIR
from cfnlint.rules import Rules
from cfnlint.runner.template import run_template_by_data
from cfnlint.runner import run_template_by_data


class TestRunner(BaseTestCase):
Expand Down

0 comments on commit 12cf66e

Please sign in to comment.