Skip to content

Commit 12cf66e

Browse files
committed
Cleanup importing
1 parent 6ba216e commit 12cf66e

7 files changed

Lines changed: 33 additions & 9 deletions

File tree

src/cfnlint/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
from cfnlint.decode.decode import decode_str
1212
from cfnlint.helpers import REGION_PRIMARY, REGIONS
1313
from cfnlint.rules import Match, RulesCollection
14-
from cfnlint.runner import Runner
15-
from cfnlint.runner.template import run_template_by_data
14+
from cfnlint.runner import Runner, run_template_by_data
1615

1716
Matches = List[Match]
1817

src/cfnlint/rules/parameters/DeploymentParameters.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ class DeploymentParameters(CfnLintJsonSchema):
1515
"""Check if Parameters are configured correctly"""
1616

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

src/cfnlint/runner/__init__.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
SPDX-License-Identifier: MIT-0
44
"""
55

6-
__all__ = ["main", "Runner"]
6+
__all__ = [
7+
"main",
8+
"Runner",
9+
"run_template_by_data",
10+
"run_template_by_file_path",
11+
"run_deployment_file",
12+
"CfnLintExitException",
13+
"InvalidRegionException",
14+
"UnexpectedRuleException",
15+
]
716

817
from cfnlint.runner.cli import Runner, main
18+
from cfnlint.runner.deployment_file import run_deployment_file
19+
from cfnlint.runner.exceptions import (
20+
CfnLintExitException,
21+
InvalidRegionException,
22+
UnexpectedRuleException,
23+
)
24+
from cfnlint.runner.template import run_template_by_data, run_template_by_file_path

src/cfnlint/runner/deployment_file/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
SPDX-License-Identifier: MIT-0
44
"""
5+
6+
__all__ = ["run_deployment_file"]
7+
8+
from cfnlint.runner.deployment_file.runner import run_deployment_file

test/unit/module/rule/test_rule_child.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from cfnlint import ConfigMixIn
1010
from cfnlint.decode.decode import decode_str
1111
from cfnlint.rules import CloudFormationLintRule, Match, RuleMatch, Rules
12-
from cfnlint.runner.template import run_template_by_data
12+
from cfnlint.runner import run_template_by_data
1313

1414

1515
class TestCloudFormationRuleChild(BaseTestCase):

test/unit/module/runner/test_rule_configuration.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
from test.testlib.testcase import BaseTestCase
88

99
from cfnlint.config import ConfigMixIn
10-
from cfnlint.runner import Runner
11-
from cfnlint.runner.exceptions import UnexpectedRuleException
10+
from cfnlint.runner import Runner, UnexpectedRuleException
1211

1312

1413
class TestGetRules(BaseTestCase):

test/unit/module/runner/test_template_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from cfnlint import ConfigMixIn
1111
from cfnlint.config import _DEFAULT_RULESDIR
1212
from cfnlint.rules import Rules
13-
from cfnlint.runner.template import run_template_by_data
13+
from cfnlint.runner import run_template_by_data
1414

1515

1616
class TestRunner(BaseTestCase):

0 commit comments

Comments
 (0)