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 db21b73
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 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
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 db21b73

Please sign in to comment.