Repository: aws-cloudformation/cfn-lint

Issue:
cfn-lint incorrectly reports "E3682 Additional properties are not allowed" when using --configure-rule
### CloudFormation Lint Version

cfn-lint 1.37.0

### What operating system are you using?

macOS 15.5

### Describe the bug

When invoking cfn-lint with the `--configure-rule "E3031:exceptions=^\${opt.*"` flag to provide an exception for the E3031 rule, an unrelated error `E3682 Additional properties are not allowed` is reported. This error is not present when the same CloudFormation template is linted without the `--configure-rule` flag. 

### Expected behavior

The error E3682 should not be reported when `--configure-rule` flag passed as a cli parameter 

### Reproduction template

```yaml
Parameters:
  MyDbPassword:
    Type: String
    NoEcho: true
Resources:
  PostgresInstance:
    Type: AWS::RDS::DBInstance
    DeletionPolicy: Delete
    Properties:
      Engine: postgres
      MasterUserPassword: !Ref MyDbPassword
```


Discussion:
Two things with this:
1. This rule parameter takes a list of strings so this regex pattern in the rule is getting set to `^`, etc. 
2. The pattern rule for if comparisons should be switched to the default pattern rule that doesn't allow exceptions



Patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1598ad124e..eec099e21f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,18 +15,17 @@ repos:
       - id: mixed-line-ending
         args: [--fix, auto]
       - id: trailing-whitespace
-  - repo: https://github.com/psf/black
-    rev: 24.8.0
+  - repo: https://github.com/astral-sh/ruff-pre-commit
+    # Ruff version.
+    rev: v0.12.4
     hooks:
-    - id: black
+      - id: ruff
+        args: [ --fix, --exit-non-zero-on-fix ]
+      - id: ruff-format
   - repo: https://github.com/PyCQA/isort
     rev: 5.13.2
     hooks:
     - id: isort
-  - repo: https://github.com/charliermarsh/ruff-pre-commit
-    rev: "v0.5.7"
-    hooks:
-      - id: ruff
   - repo: https://github.com/PyCQA/bandit
     rev: "1.7.9"
     hooks:
diff --git a/pyproject.toml b/pyproject.toml
index ddc1bd9920..2f86c14a8d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -56,10 +56,6 @@ Source = "https://github.com/aws-cloudformation/cfn-lint"
 [tool.isort]
 profile = "black"
 
-[tool.black]
-skip-string-normalization = false
-line-length = 88
-
 [tool.bandit]
 skips = ["B101", "B303", "B310", "B110", "B112", "B324", "B404", "B603", "B607"]
 exclude_dirs = ["tests", "scripts"]
@@ -68,6 +64,7 @@ exclude_dirs = ["tests", "scripts"]
 # Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
 lint.select = ["E", "F"]
 lint.ignore = []
+line-length = 88
 
 # Allow autofix for all enabled rules (when `--fix`) is provided.
 lint.fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
@@ -97,12 +94,13 @@ exclude = [
     "node_modules",
     "venv",
 ]
-# Same as Black.
-line-length = 88
 
 [tool.ruff.lint.per-file-ignores]
 "__init__.py" = ["F401"]
 
+[tool.ruff.format]
+quote-style = "double"
+
 [tool.pytest.ini_options]
 addopts = [
   "-m not data"
diff --git a/scripts/boto/_automated_patches.py b/scripts/boto/_automated_patches.py
index 0afce6b21b..546a2bdcd3 100644
--- a/scripts/boto/_automated_patches.py
+++ b/scripts/boto/_automated_patches.py
@@ -109,7 +109,6 @@ def _nested_arrays(
     start_path: str,
     source: list[str],
 ):
-
     shape = shape_data.get("member", {}).get("shape")
     if not shape:
         return []
@@ -230,7 +229,6 @@ def _per_resource_patch(
 def get_resource_patches(
     service_dir: Path, schema_path: Path, service_name: str, last_date: str
 ) -> AllPatches:
-
     results: AllPatches = {}
 
     services_file = Path(f"{service_dir}/{last_date}/service-2.json")
diff --git a/scripts/boto/_manual_patches.py b/scripts/boto/_manual_patches.py
index 00eaf57165..a30d8c928f 100644
--- a/scripts/boto/_manual_patches.py
+++ b/scripts/boto/_manual_patches.py
@@ -48,8 +48,7 @@
     },
     "AWS::ApplicationAutoScaling::ScalingPolicy": {
         (
-            "/definitions/PredefinedMetricSpecification/"
-            "properties/PredefinedMetricType"
+            "/definitions/PredefinedMetricSpecification/properties/PredefinedMetricType"
         ): Patch(
             source=["application-autoscaling", "2016-02-06"],
             shape="MetricType",
@@ -79,8 +78,7 @@
             shape="MetricStatistic",
         ),
         (
-            "/definitions/PredefinedMetricSpecification/"
-            "properties/PredefinedMetricType"
+            "/definitions/PredefinedMetricSpecification/properties/PredefinedMetricType"
         ): Patch(
             source=["autoscaling", "2011-01-01"],
             shape="MetricType",
diff --git a/scripts/boto/update_schemas_from_boto.py b/scripts/boto/update_schemas_from_boto.py
index ae54954750..c1f4e199ba 100755
--- a/scripts/boto/update_schemas_from_boto.py
+++ b/scripts/boto/update_schemas_from_boto.py
@@ -3,6 +3,7 @@
 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 SPDX-License-Identifier: MIT-0
 """
+
 import io
 import json
 import logging
diff --git a/scripts/create_cfn_schema_rule.py b/scripts/create_cfn_schema_rule.py
index a88ed5ce0c..b2200f631b 100755
--- a/scripts/create_cfn_schema_rule.py
+++ b/scripts/create_cfn_schema_rule.py
@@ -3,6 +3,7 @@
 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 SPDX-License-Identifier: MIT-0
 """
+
 import argparse
 import logging
 import pathlib
diff --git a/scripts/install b/scripts/install
index c051210973..a70848271e 100755
--- a/scripts/install
+++ b/scripts/install
@@ -91,7 +91,7 @@ def _create_virtualenv_external(location, working_dir):
         # so we can listdir()[0] it.
         with cd(os.listdir(".")[0]):
             run(
-                ("%s virtualenv.py --no-download " "--python %s %s")
+                ("%s virtualenv.py --no-download --python %s %s")
                 % (sys.executable, sys.executable, location)
             )
 
diff --git a/scripts/make-bundle b/scripts/make-bundle
index 15fbfe0ac9..579a8c2419 100755
--- a/scripts/make-bundle
+++ b/scripts/make-bundle
@@ -12,6 +12,7 @@ interface for those not familiar with the python
 ecosystem.
 
 """
+
 import os
 import shutil
 import subprocess
diff --git a/scripts/release/_translator.py b/scripts/release/_translator.py
index 18501c994c..b814661aa7 100644
--- a/scripts/release/_translator.py
+++ b/scripts/release/_translator.py
@@ -16,7 +16,6 @@
 
 
 def required_xor(properties: list[str]) -> dict[str, list[Any]]:
-
     return {"oneOf": [{"required": [p]} for p in properties]}
 
 
@@ -39,7 +38,6 @@ def dependent_excluded(properties: dict[str, list[str]]) -> dict[str, list[Any]]
 
 
 def _find_keywords(schema: Any) -> Iterator[deque[str | int]]:
-
     if isinstance(schema, list):
         for i, item in enumerate(schema):
             for path in _find_keywords(item):
diff --git a/scripts/release/changelog.py b/scripts/release/changelog.py
index 5334212ab7..481af7bbe9 100755
--- a/scripts/release/changelog.py
+++ b/scripts/release/changelog.py
@@ -17,7 +17,6 @@
 output = []
 
 for line in text.splitlines():
-
     if line.startswith("### "):
         if args.version == line[3:].strip():
             found = True
diff --git a/scripts/release/generator.py b/scripts/release/generator.py
index 3f7c5392b9..985ba03f0f 100755
--- a/scripts/release/generator.py
+++ b/scripts/release/generator.py
@@ -3,6 +3,7 @@
 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 SPDX-License-Identifier: MIT-0
 """
+
 import logging
 import tarfile
 from collections import deque
diff --git a/scripts/update_schemas_format.py b/scripts/update_schemas_format.py
index 4bf453aaeb..962204cbd4 100755
--- a/scripts/update_schemas_format.py
+++ b/scripts/update_schemas_format.py
@@ -66,7 +66,6 @@ def _create_cidr_patch(type_name: str, ref: str, resolver: RefResolver, format:
 
 
 def _create_subnet_ids_patch(type_name: str, ref: str, resolver: RefResolver):
-
     _, resolved = resolver.resolve(ref)
     if "$ref" in resolved:
         return _create_subnet_ids_patch(
@@ -159,7 +158,6 @@ def _create_security_group_id(type_name: str, ref: str, resolver: RefResolver):
 
 
 def _create_security_group_name(type_name: str, ref: str, resolver: RefResolver):
-
     _, resolved = resolver.resolve(ref)
     if "$ref" in resolved:
         return _create_security_group_name(
diff --git a/scripts/update_schemas_from_aws_api.py b/scripts/update_schemas_from_aws_api.py
index 0722c11baf..d195dc34f3 100755
--- a/scripts/update_schemas_from_aws_api.py
+++ b/scripts/update_schemas_from_aws_api.py
@@ -6,6 +6,7 @@
 Updates our dynamic patches from the pricing API
 This script requires Boto3 and Credentials to call the Pricing API
 """
+
 import json
 import logging
 
diff --git a/scripts/update_schemas_manually.py b/scripts/update_schemas_manually.py
index ff77840928..fe8018b1f3 100755
--- a/scripts/update_schemas_manually.py
+++ b/scripts/update_schemas_manually.py
@@ -3,6 +3,7 @@
 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 SPDX-License-Identifier: MIT-0
 """
+
 import json
 import logging
 import os
diff --git a/scripts/update_specs_from_pricing.py b/scripts/update_specs_from_pricing.py
index b33a29f363..8b201dbb56 100755
--- a/scripts/update_specs_from_pricing.py
+++ b/scripts/update_specs_from_pricing.py
@@ -6,6 +6,7 @@
 Updates our dynamic patches from the pricing API
 This script requires Boto3 and Credentials to call the Pricing API
 """
+
 import json
 import logging
 
diff --git a/src/cfnlint/conditions/_rule.py b/src/cfnlint/conditions/_rule.py
index 48a6320af7..5b4f18fa37 100644
--- a/src/cfnlint/conditions/_rule.py
+++ b/src/cfnlint/conditions/_rule.py
@@ -86,7 +86,6 @@ def __init__(self, assertions: list[dict], all_conditions: dict[str, dict]) -> N
             self._assertions.append(_Assertion(assert_, all_conditions))
 
     def build_cnf(self, params: dict[str, Symbol]) -> BooleanFunction | Symbol | None:
-
         assertions = []
         for assertion in self._assertions:
             assertions.append(assertion.build_cnf(params))
@@ -99,7 +98,6 @@ def build_cnf(self, params: dict[str, Symbol]) -> BooleanFunction | Symbol | Non
 
     @property
     def equals(self) -> list[Equal]:
-
         results = []
         for assertion in self._assertions:
             results.extend(assertion.equals)
@@ -107,7 +105,6 @@ def equals(self) -> list[Equal]:
 
 
 class Rule:
-
     def __init__(self, rule: _RULE, all_conditions: dict[str, dict]) -> None:
         self._condition: _Assertion | None = None
         self._assertions: _Assertions | None = None
@@ -137,7 +134,6 @@ def equals(self) -> list[Equal]:
         return result
 
     def build_cnf(self, params: dict[str, Symbol]) -> BooleanFunction | Symbol | None:
-
         if self._assertions:
             if self._condition:
                 return Implies(
diff --git a/src/cfnlint/config.py b/src/cfnlint/config.py
index d2d1a00d3a..1611715c48 100644
--- a/src/cfnlint/config.py
+++ b/src/cfnlint/config.py
@@ -668,17 +668,17 @@ def set_template_args(self, template):
 
             if isinstance(configs, dict):
                 for key, value in {
-                    "append_rules": (list),
-                    "configure_rules": (dict),
-                    "custom_rules": (str),
-                    "ignore_bad_template": (bool),
-                    "ignore_checks": (list),
-                    "include_checks": (list),
-                    "include_experimental": (bool),
-                    "override_spec": (str),
-                    "parameters": (list),
-                    "parameter_files": (list),
-                    "regions": (list),
+                    "append_rules": list,
+                    "configure_rules": dict,
+                    "custom_rules": str,
+                    "ignore_bad_template": bool,
+                    "ignore_checks": list,
+                    "include_checks": list,
+                    "include_experimental": bool,
+                    "override_spec": str,
+                    "parameters": list,
+                    "parameter_files": list,
+                    "regions": list,
                 }.items():
                     if key in configs:
                         if isinstance(configs[key], value):
diff --git a/src/cfnlint/context/_mappings.py b/src/cfnlint/context/_mappings.py
index 7599aea010..c0b9e21993 100644
--- a/src/cfnlint/context/_mappings.py
+++ b/src/cfnlint/context/_mappings.py
@@ -23,7 +23,6 @@ class Mappings:
 
     @classmethod
     def create_from_dict(cls, instance: Any) -> Mappings:
-
         if not isinstance(instance, dict):
             return cls({})
         try:
diff --git a/src/cfnlint/context/conditions/_conditions.py b/src/cfnlint/context/conditions/_conditions.py
index f1b87fb94d..19ceb9742b 100644
--- a/src/cfnlint/context/conditions/_conditions.py
+++ b/src/cfnlint/context/conditions/_conditions.py
@@ -77,7 +77,6 @@ def create_from_instance(
 
         cnf = None
         for p_k, p_v in parameters.items():
-
             if not p_v.allowed_values:
                 continue
             allowed_values = p_v.allowed_values.copy()
@@ -182,16 +181,18 @@ def _build_conditions(self, conditions: set[str]) -> Iterator["Conditions"]:
     def evolve_from_instance(
         self, instance: Any, context: "Context"
     ) -> Iterator[tuple[Any, "Conditions"]]:
-
         conditions = get_conditions_from_property(instance)
 
         for scenario in self._build_conditions(conditions):
-            yield build_instance_from_scenario(
-                instance,
-                scenario.status,
-                is_root=True,
-                context=context,
-            ), scenario
+            yield (
+                build_instance_from_scenario(
+                    instance,
+                    scenario.status,
+                    is_root=True,
+                    context=context,
+                ),
+                scenario,
+            )
 
     @property
     def status(self) -> dict[str, bool]:
diff --git a/src/cfnlint/context/conditions/exceptions.py b/src/cfnlint/context/conditions/exceptions.py
index d67d351ef7..b068a377b2 100644
--- a/src/cfnlint/context/conditions/exceptions.py
+++ b/src/cfnlint/context/conditions/exceptions.py
@@ -44,7 +44,6 @@ def _build_message(current_status: dict[str, bool], new_status: dict[str, bool])
 
 
 class Unsatisfiable(ValueError):
-
     def __init__(
         self,
         new_status: dict[str, bool],
diff --git a/src/cfnlint/context/context.py b/src/cfnlint/context/context.py
index e22130d03d..bfaf0792c2 100644
--- a/src/cfnlint/context/context.py
+++ b/src/cfnlint/context/context.py
@@ -182,6 +182,10 @@ class Context:
     parameter_sets: list[ParameterSet] | None = field(init=True, default_factory=list)
     is_resolved_from_parameters: bool = field(init=True, default=False)
 
+    # For rule exceptions.  This is primarily used for if/then/else statements in which
+    # exceptions will affect the results.
+    allow_exceptions: bool = field(init=True, default=True)
+
     def evolve(self, **kwargs) -> "Context":
         """
         Create a new context without merging together attributes
@@ -222,13 +226,16 @@ def ref_value(self, instance: str) -> Iterator[Tuple[str | list[str], "Context"]
             for region in self.regions:
                 # We can resolve all region based pseudo values
                 # as we are now deciding on a region.
-                yield _get_pseudo_value_by_region(instance, region), self.evolve(
-                    regions=[region],
-                    ref_values={
-                        p: _get_pseudo_value_by_region(p, region)
-                        for p in PSEUDOPARAMS
-                        if p not in _PSEUDOPARAMS_NON_REGION
-                    },
+                yield (
+                    _get_pseudo_value_by_region(instance, region),
+                    self.evolve(
+                        regions=[region],
+                        ref_values={
+                            p: _get_pseudo_value_by_region(p, region)
+                            for p in PSEUDOPARAMS
+                            if p not in _PSEUDOPARAMS_NON_REGION
+                        },
+                    ),
                 )
 
         if instance in self.parameters:
@@ -237,35 +244,44 @@ def ref_value(self, instance: str) -> Iterator[Tuple[str | list[str], "Context"]
             if self.parameter_sets is not None and len(self.parameter_sets) > 0:
                 for parameter_set in self.parameter_sets:
                     if instance in parameter_set.parameters:
-                        yield parameter_set.parameters[instance], self.evolve(
-                            ref_values=parameter_set.parameters,
-                            parameter_sets=None,
-                            is_resolved_from_parameters=True,
+                        yield (
+                            parameter_set.parameters[instance],
+                            self.evolve(
+                                ref_values=parameter_set.parameters,
+                                parameter_sets=None,
+                                is_resolved_from_parameters=True,
+                            ),
                         )
                     else:
                         for v, path in self.parameters[instance].default_value():
                             parameters = deepcopy(parameter_set.parameters)
                             parameters.update({instance: v})
-                            yield v, self.evolve(
-                                path=self.path.evolve(
-                                    value_path=deque(["Parameters", instance]) + path
+                            yield (
+                                v,
+                                self.evolve(
+                                    path=self.path.evolve(
+                                        value_path=deque(["Parameters", instance])
+                                        + path
+                                    ),
+                                    ref_values=parameters,
+                                    parameter_sets=None,
+                                    is_resolved_from_parameters=True,
                                 ),
-                                ref_values=parameters,
-                                parameter_sets=None,
-                                is_resolved_from_parameters=True,
                             )
                 return
 
             for v, path in self.parameters[instance].ref_value(self):
-
                 # validate that ref is possible with path
                 # need to evaluate if Fn::If would be not true if value is
                 # what it is
-                yield v, self.evolve(
-                    path=self.path.evolve(
-                        value_path=deque(["Parameters", instance]) + path
+                yield (
+                    v,
+                    self.evolve(
+                        path=self.path.evolve(
+                            value_path=deque(["Parameters", instance]) + path
+                        ),
+                        ref_values={instance: v},
                     ),
-                    ref_values={instance: v},
                 )
 
     @property
diff --git a/src/cfnlint/context/parameters.py b/src/cfnlint/context/parameters.py
index 916b84e1ba..426d9afde1 100644
--- a/src/cfnlint/context/parameters.py
+++ b/src/cfnlint/context/parameters.py
@@ -11,6 +11,5 @@
 
 @dataclass
 class ParameterSet:
-
     source: str | None = field(default=None)
     parameters: dict[str, Any] = field(default_factory=dict)
diff --git a/src/cfnlint/decode/cfn_yaml.py b/src/cfnlint/decode/cfn_yaml.py
index 340545b0e2..e31eaac31d 100644
--- a/src/cfnlint/decode/cfn_yaml.py
+++ b/src/cfnlint/decode/cfn_yaml.py
@@ -211,7 +211,6 @@ def construct_yaml_seq(self, node):
 
 
 class _Scanner(Scanner):
-
     def __init__(self) -> None:
         super().__init__()
         self.ESCAPE_REPLACEMENTS = {
diff --git a/src/cfnlint/decode/decode.py b/src/cfnlint/decode/decode.py
index f1c1f3d83b..42240668ec 100644
--- a/src/cfnlint/decode/decode.py
+++ b/src/cfnlint/decode/decode.py
@@ -121,10 +121,8 @@ def _decode(
                     [
                         create_match_file_error(
                             filename,
-                            (
-                                f"Tried to parse {filename} as JSON but got error:"
-                                f" {str(json_err)}"
-                            ),
+                            f"Tried to parse {filename} as JSON but got error:"
+                            f" {str(json_err)}",
                         )
                     ],
                 )
diff --git a/src/cfnlint/formatters/pretty.py b/src/cfnlint/formatters/pretty.py
index 716205f121..03a3fc3c2e 100644
--- a/src/cfnlint/formatters/pretty.py
+++ b/src/cfnlint/formatters/pretty.py
@@ -28,13 +28,15 @@ def print_matches(self, matches, rules, config):
 
         # ruff: noqa: E501
         results.append(
-            f"Cfn-lint scanned {colored(1 if config.templates is None else len(config.templates), color.bold_reset)}"
+            "Cfn-lint scanned"
+            f" {colored(1 if config.templates is None else len(config.templates), color.bold_reset)}"
             " templates against "
             f"{colored(len(rules.used_rules), color.bold_reset)} rules and found "
-            f'{colored(len([i for i in matches if i.rule.severity.lower() == "error"]), color.error)} '
-            f'errors, {colored(len([i for i in matches if i.rule.severity.lower() == "warning"]), color.warning)} '
+            f"{colored(len([i for i in matches if i.rule.severity.lower() == 'error']), color.error)} "
+            "errors,"
+            f" {colored(len([i for i in matches if i.rule.severity.lower() == 'warning']), color.warning)} "
             f"warnings, and "
-            f'{colored(len([i for i in matches if i.rule.severity.lower() == "informational"]), color.informational)} '
+            f"{colored(len([i for i in matches if i.rule.severity.lower() == 'informational']), color.informational)} "
             f"informational violations"
         )
         return "\n".join(results)
diff --git a/src/cfnlint/jsonschema/_keywords.py b/src/cfnlint/jsonschema/_keywords.py
index fde52117c9..0bfd41882a 100644
--- a/src/cfnlint/jsonschema/_keywords.py
+++ b/src/cfnlint/jsonschema/_keywords.py
@@ -66,19 +66,15 @@ def additionalProperties(
                 for key in schema.get("properties", {}).keys():
                     if SequenceMatcher(a=extra, b=key).ratio() > 0.8:
                         yield ValidationError(
-                            (
-                                f"Additional properties are not allowed ({extra!r} "
-                                f"was unexpected. Did you mean {key!r}?)"
-                            ),
+                            f"Additional properties are not allowed ({extra!r} "
+                            f"was unexpected. Did you mean {key!r}?)",
                             path=[extra],
                         )
                         break
                 else:
                     yield ValidationError(
-                        (
-                            f"Additional properties are not allowed ({extra!r} "
-                            "was unexpected)"
-                        ),
+                        f"Additional properties are not allowed ({extra!r} "
+                        "was unexpected)",
                         path=[extra],
                     )
 
@@ -314,7 +310,14 @@ def if_(
             add_cfn_lint_keyword=False,
         )
     )
-    if validator.evolve(schema=if_schema).is_valid(instance):
+
+    if_validator = validator.evolve(
+        context=validator.context.evolve(
+            allow_exceptions=False,
+        )
+    )
+
+    if if_validator.evolve(schema=if_schema).is_valid(instance):
         if "then" in schema:
             then = schema["then"]
             yield from validator.descend(instance, then, schema_path="then")
@@ -339,7 +342,7 @@ def items(
         rest = instance[prefix:] if extra != 1 else instance[prefix]
         item = "items" if prefix != 1 else "item"
         yield ValidationError(
-            f"Expected at most {prefix} {item} but found {extra} " f"extra: {rest!r}",
+            f"Expected at most {prefix} {item} but found {extra} extra: {rest!r}",
         )
     else:
         for index in range(prefix, total):
diff --git a/src/cfnlint/jsonschema/_keywords_cfn.py b/src/cfnlint/jsonschema/_keywords_cfn.py
index 83ef9f2619..330683b9a9 100644
--- a/src/cfnlint/jsonschema/_keywords_cfn.py
+++ b/src/cfnlint/jsonschema/_keywords_cfn.py
@@ -71,7 +71,6 @@ def cfnContext(
     instance: Any,
     schema: Any,
 ) -> ValidationResult:
-
     context_parameters: dict[str, Any] = {}
 
     functions = s.get("functions")
@@ -126,10 +125,8 @@ def dynamicValidation(
     if transform_check is not None:
         if transform_check not in validator.context.transforms.transforms:
             yield ValidationError(
-                (
-                    f"Transform {transform_check!r} is required "
-                    "but not present in the template"
-                )
+                f"Transform {transform_check!r} is required "
+                "but not present in the template"
             )
 
     # Handle dynamic source validation
diff --git a/src/cfnlint/jsonschema/_resolvers_cfn.py b/src/cfnlint/jsonschema/_resolvers_cfn.py
index a862b2bb0b..ebbeb4b22a 100644
--- a/src/cfnlint/jsonschema/_resolvers_cfn.py
+++ b/src/cfnlint/jsonschema/_resolvers_cfn.py
@@ -55,23 +55,29 @@ def find_in_map(validator: Validator, instance: Any) -> ResolutionResult:
             if "DefaultValue" in options:
                 default_value_found = True
                 for value, v, _ in validator.resolve_value(options["DefaultValue"]):
-                    yield value, v.evolve(
-                        context=v.context.evolve(
-                            path=v.context.path.evolve(
-                                value_path=deque([4, "DefaultValue"])
-                            )
+                    yield (
+                        value,
+                        v.evolve(
+                            context=v.context.evolve(
+                                path=v.context.path.evolve(
+                                    value_path=deque([4, "DefaultValue"])
+                                )
+                            ),
                         ),
-                    ), None
+                        None,
+                    )
 
     if not default_value_found and not validator.context.mappings.maps:
         if validator.context.mappings.is_transform:
             return
-        yield None, validator, ValidationError(
-            (
+        yield (
+            None,
+            validator,
+            ValidationError(
                 f"{instance[0]!r} is not one of "
-                f"{list(validator.context.mappings.maps.keys())!r}"
+                f"{list(validator.context.mappings.maps.keys())!r}",
+                path=deque([0]),
             ),
-            path=deque([0]),
         )
 
     mappings = list(validator.context.mappings.maps.keys())
@@ -155,22 +161,26 @@ def find_in_map(validator: Validator, instance: Any) -> ResolutionResult:
                                 )
 
                 if not found_top_level_key:
-                    yield None, validator, ValidationError(
-                        (
+                    yield (
+                        None,
+                        validator,
+                        ValidationError(
                             f"{instance[1]!r} is not a "
-                            f"first level key for mapping {map_name!r}"
+                            f"first level key for mapping {map_name!r}",
+                            path=deque([1]),
                         ),
-                        path=deque([1]),
                     )
                 elif not found_second_key:
-                    yield None, validator, ValidationError(
-                        (
+                    yield (
+                        None,
+                        validator,
+                        ValidationError(
                             f"{instance[2]!r} is not a "
                             "second level key when "
                             f"{instance[1]!r} is resolved "
-                            f"for mapping {map_name!r}"
+                            f"for mapping {map_name!r}",
+                            path=deque([2]),
                         ),
-                        path=deque([2]),
                     )
             continue
 
@@ -188,11 +198,9 @@ def find_in_map(validator: Validator, instance: Any) -> ResolutionResult:
                             None,
                             top_v,
                             ValidationError(
-                                (
-                                    f"{top_level_key!r} is not one of "
-                                    f"{top_level_keys!r} for mapping "
-                                    f"{map_name!r}"
-                                ),
+                                f"{top_level_key!r} is not one of "
+                                f"{top_level_keys!r} for mapping "
+                                f"{map_name!r}",
                                 path=deque([1]),
                             ),
                         )
@@ -229,12 +237,10 @@ def find_in_map(validator: Validator, instance: Any) -> ResolutionResult:
                                 None,
                                 second_v,
                                 ValidationError(
-                                    (
-                                        f"{second_level_key!r} is not "
-                                        f"one of {second_level_keys!r} "
-                                        f"for mapping {map_name!r} and "
-                                        f"key {top_level_key!r}"
-                                    ),
+                                    f"{second_level_key!r} is not "
+                                    f"one of {second_level_keys!r} "
+                                    f"for mapping {map_name!r} and "
+                                    f"key {top_level_key!r}",
                                     path=deque([2]),
                                 ),
                             )
@@ -328,15 +334,17 @@ def join(validator: Validator, instance: Any) -> ResolutionResult:
             try:
                 for value, expansion_validator in _join_expansion(values_v, values):
                     # reset the value path because we could get a Ref value_path
-                    yield delimiter.join(
-                        [str(v) for v in value]
-                    ), expansion_validator.evolve(
-                        context=expansion_validator.context.evolve(
-                            path=expansion_validator.context.path.evolve(
-                                value_path=deque([])
+                    yield (
+                        delimiter.join([str(v) for v in value]),
+                        expansion_validator.evolve(
+                            context=expansion_validator.context.evolve(
+                                path=expansion_validator.context.path.evolve(
+                                    value_path=deque([])
+                                )
                             )
-                        )
-                    ), None
+                        ),
+                        None,
+                    )
             except (ValueError, TypeError):
                 return
 
diff --git a/src/cfnlint/jsonschema/validators.py b/src/cfnlint/jsonschema/validators.py
index 76f5bbcf3e..18e1dea31f 100644
--- a/src/cfnlint/jsonschema/validators.py
+++ b/src/cfnlint/jsonschema/validators.py
@@ -155,7 +155,8 @@ def _resolve_fn(self, key: str, value: Any) -> ResolutionResult:
                     fn_resolved_validator,
                     fn_resolved_err,
                 ) in self.fn_resolvers[key](
-                    value_resolved_validator, value_resolved_value  # type: ignore
+                    value_resolved_validator,  # type: ignore
+                    value_resolved_value,
                 ):
                     if fn_resolved_err:
                         fn_resolved_err.path.appendleft(key)
@@ -184,11 +185,15 @@ def resolve_value(self, instance: Any) -> ResolutionResult:
                                     region_context.conditions.status,
                                     region_context.ref_values,
                                 ):
-                                    yield r_value, r_validator.evolve(
-                                        context=region_context.evolve(
-                                            is_resolved_value=True,
-                                        )
-                                    ), r_errs
+                                    yield (
+                                        r_value,
+                                        r_validator.evolve(
+                                            context=region_context.evolve(
+                                                is_resolved_value=True,
+                                            )
+                                        ),
+                                        r_errs,
+                                    )
                         except UnknownSatisfisfaction as err:
                             LOGGER.debug(err)
                             return
diff --git a/src/cfnlint/maintenance.py b/src/cfnlint/maintenance.py
index 96b5411c59..7fcc377803 100644
--- a/src/cfnlint/maintenance.py
+++ b/src/cfnlint/maintenance.py
@@ -103,7 +103,7 @@ def update_documentation(rules):
             rule_id = rule.id + "*" if rule.experimental else rule.id
             tags = ",".join(f"`{tag}`" for tag in rule.tags)
             config = "<br />".join(
-                f'{key}:{values.get("type")}:{values.get("default")}'
+                f"{key}:{values.get('type')}:{values.get('default')}"
                 for key, values in rule.config_definition.items()
             )
             new_file.write(
diff --git a/src/cfnlint/rules/_rule.py b/src/cfnlint/rules/_rule.py
index 77359f25b2..0316a96520 100644
--- a/src/cfnlint/rules/_rule.py
+++ b/src/cfnlint/rules/_rule.py
@@ -303,7 +303,7 @@ def configure(self, configs=None, experimental=False):
                         self.config[key] = int(value)
                     elif self.config_definition[key]["type"] == "list":
                         self.config[key] = []
-                        for l_value in value:
+                        for l_value in cfnlint.helpers.ensure_list(value):
                             if self.config_definition[key]["itemtype"] == "boolean":
                                 self.config[key].append(
                                     cfnlint.helpers.bool_compare(l_value, True)
diff --git a/src/cfnlint/rules/aws_cli/UsingMerge.py b/src/cfnlint/rules/aws_cli/UsingMerge.py
index 92bb7448ab..198249da68 100644
--- a/src/cfnlint/rules/aws_cli/UsingMerge.py
+++ b/src/cfnlint/rules/aws_cli/UsingMerge.py
@@ -44,5 +44,4 @@ def _nested_obj(self, obj: Any, path: list[str | int]) -> list[RuleMatch]:
         return matches
 
     def match(self, cfn: Template):
-
         return self._nested_obj(cfn.template, [])
diff --git a/src/cfnlint/rules/deployment_files/Configuration.py b/src/cfnlint/rules/deployment_files/Configuration.py
index 90c1f3854a..26d084dcf8 100644
--- a/src/cfnlint/rules/deployment_files/Configuration.py
+++ b/src/cfnlint/rules/deployment_files/Configuration.py
@@ -11,7 +11,6 @@
 
 
 class Configuration(BaseJsonSchema):
-
     id = "E0100"
     shortdesc = "Validate deployment file configuration"
     description = (
diff --git a/src/cfnlint/rules/deployment_files/Parameters.py b/src/cfnlint/rules/deployment_files/Parameters.py
index 96fc6a23e0..dfa4fd8ef4 100644
--- a/src/cfnlint/rules/deployment_files/Parameters.py
+++ b/src/cfnlint/rules/deployment_files/Parameters.py
@@ -84,7 +84,6 @@ def validate(self, validator: Validator, _: Any, instance: Any, schema: Any):
             return
 
         for parameter_set in validator.context.parameter_sets:
-
             cfn_validator = self.extend_validator(
                 validator=validator,
                 schema=self._build_schema(instance),
diff --git a/src/cfnlint/rules/errors/config.py b/src/cfnlint/rules/errors/config.py
index 1a7b533152..30988449e3 100644
--- a/src/cfnlint/rules/errors/config.py
+++ b/src/cfnlint/rules/errors/config.py
@@ -7,7 +7,6 @@
 
 
 class ConfigError(CloudFormationLintRule):
-
     id = "E0003"
     shortdesc = "Error with cfn-lint configuration"
     description = "Error as a result of the cfn-lint configuration"
diff --git a/src/cfnlint/rules/formats/Format.py b/src/cfnlint/rules/formats/Format.py
index db43abc54a..22348d07e9 100644
--- a/src/cfnlint/rules/formats/Format.py
+++ b/src/cfnlint/rules/formats/Format.py
@@ -36,10 +36,8 @@ def format(
                 if not rule.format(validator, instance):  # type: ignore
                     if hasattr(rule, "pattern") and rule.pattern:
                         yield ValidationError(
-                            (
-                                f"{instance!r} is not a {format!r} with "
-                                f"pattern {rule.pattern!r}"
-                            ),
+                            f"{instance!r} is not a {format!r} with "
+                            f"pattern {rule.pattern!r}",
                             rule=rule,
                         )
                         continue
diff --git a/src/cfnlint/rules/formats/FormatKeyword.py b/src/cfnlint/rules/formats/FormatKeyword.py
index 1368b27ab3..dd836f1c6e 100644
--- a/src/cfnlint/rules/formats/FormatKeyword.py
+++ b/src/cfnlint/rules/formats/FormatKeyword.py
@@ -14,7 +14,6 @@
 
 
 class FormatKeyword(CloudFormationLintRule):
-
     def __init__(self, format: str | None = None, pattern: str | None = None) -> None:
         super().__init__()
         self.format_keyword = format
diff --git a/src/cfnlint/rules/formats/ImageId.py b/src/cfnlint/rules/formats/ImageId.py
index b26f5eb840..b9b322498c 100644
--- a/src/cfnlint/rules/formats/ImageId.py
+++ b/src/cfnlint/rules/formats/ImageId.py
@@ -29,8 +29,9 @@ def format(self, validator: Validator, instance: Any) -> bool:
         if not isinstance(instance, str):
             return True
 
-        if validator.context.path.cfn_path_string == (
-            "Resources/AWS::EC2::LaunchTemplate/"
+        if (
+            validator.context.path.cfn_path_string
+            == "Resources/AWS::EC2::LaunchTemplate/"
             "Properties/LaunchTemplateData/ImageId"
         ):
             if instance.startswith("resolve:ssm"):
diff --git a/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerArn.py b/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerArn.py
index 376a5ede69..cce5e692dc 100644
--- a/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerArn.py
+++ b/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerArn.py
@@ -26,7 +26,6 @@ class DynamicReferenceSecretsManagerArn(CloudFormationLintRule):
     tags = ["functions", "dynamic reference"]
 
     def validate(self, validator: Validator, s: Any, instance: Any, schema: Any):
-
         if "Fn::Sub" == validator.context.path.path[-1]:
             if not re.match(r"^(\\\")?{{resolve:secretsmanager:.*}}(\\\")?$", instance):
                 return
@@ -52,10 +51,8 @@ def validate(self, validator: Validator, s: Any, instance: Any, schema: Any):
         for field in fields:
             if any(field == p for p in validator.context.path.path):
                 yield ValidationError(
-                    (
-                        f"Dynamic reference {instance!r} to secrets manager when "
-                        f"the field {field!r} expects the ARN to the secret and "
-                        "not the secret"
-                    ),
+                    f"Dynamic reference {instance!r} to secrets manager when "
+                    f"the field {field!r} expects the ARN to the secret and "
+                    "not the secret",
                     rule=self,
                 )
diff --git a/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerPath.py b/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerPath.py
index d45de05073..ca63bb3b4a 100644
--- a/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerPath.py
+++ b/src/cfnlint/rules/functions/DynamicReferenceSecretsManagerPath.py
@@ -36,9 +36,7 @@ def validate(self, validator: Validator, s: Any, instance: Any, schema: Any):
                 return
 
         yield ValidationError(
-            (
-                f"Dynamic reference {instance!r} to secrets manager can only be "
-                "used in resource properties"
-            ),
+            f"Dynamic reference {instance!r} to secrets manager can only be "
+            "used in resource properties",
             rule=self,
         )
diff --git a/src/cfnlint/rules/functions/DynamicReferenceSecureString.py b/src/cfnlint/rules/functions/DynamicReferenceSecureString.py
index e23af6e01b..bee33a4c50 100644
--- a/src/cfnlint/rules/functions/DynamicReferenceSecureString.py
+++ b/src/cfnlint/rules/functions/DynamicReferenceSecureString.py
@@ -43,9 +43,7 @@ def validate(self, validator: Validator, s: Any, instance: Any, schema: Any):
             return
 
         yield ValidationError(
-            (
-                f"Dynamic reference {instance!r} to SSM secure strings "
-                "can only be used in resource properties"
-            ),
+            f"Dynamic reference {instance!r} to SSM secure strings "
+            "can only be used in resource properties",
             rule=self,
         )
diff --git a/src/cfnlint/rules/functions/DynamicReferenceSsmPath.py b/src/cfnlint/rules/functions/DynamicReferenceSsmPath.py
index f2c829d28e..4b61dbd598 100644
--- a/src/cfnlint/rules/functions/DynamicReferenceSsmPath.py
+++ b/src/cfnlint/rules/functions/DynamicReferenceSsmPath.py
@@ -13,8 +13,7 @@ class DynamicReferenceSsmPath(CloudFormationLintRule):
     id = "E1052"
     shortdesc = "Validate dynamic references to SSM are in a valid location"
     description = (
-        "Dynamic references to SSM parameters are only supported "
-        "in certain locations"
+        "Dynamic references to SSM parameters are only supported in certain locations"
     )
     source_url = "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm"
     tags = ["functions", "dynamic reference"]
@@ -35,6 +34,6 @@ def validate(self, validator: Validator, s: Any, instance: Any, schema: Any):
                         return
 
         yield ValidationError(
-            (f"Dynamic reference {instance!r} to SSM parameters are not allowed here"),
+            f"Dynamic reference {instance!r} to SSM parameters are not allowed here",
             rule=self,
         )
diff --git a/src/cfnlint/rules/functions/GetAtt.py b/src/cfnlint/rules/functions/GetAtt.py
index 14bbcc8d9d..b428c127be 100644
--- a/src/cfnlint/rules/functions/GetAtt.py
+++ b/src/cfnlint/rules/functions/GetAtt.py
@@ -43,7 +43,6 @@ def _resolve_getatt(
         s: Any,
         paths: Sequence[Any],
     ) -> ValidationResult:
-
         for resource_name, resource_name_validator, _ in validator.resolve_value(
             value[0]
         ):
@@ -76,11 +75,9 @@ def _resolve_getatt(
                             ].get_atts(region)
                         ):
                             err = ValidationError(
-                                (
-                                    f"{attribute_name!r} is not one of "
-                                    f"{validator.context.resources[resource_name].get_atts(region)!r}"
-                                    f" in {regions!r}"
-                                ),
+                                f"{attribute_name!r} is not one of "
+                                f"{validator.context.resources[resource_name].get_atts(region)!r}"
+                                f" in {regions!r}",
                                 validator=self.fn.py,
                                 path=deque([self.fn.name, 1]),
                             )
@@ -129,7 +126,7 @@ def _resolve_getatt(
 
                         reprs = ", ".join(repr(type) for type in types)
                         yield ValidationError(
-                            (f"{instance!r} is not of type {reprs}"),
+                            f"{instance!r} is not of type {reprs}",
                             validator=self.fn.py,
                             path=deque([self.fn.name]),
                             schema_path=deque(["type"]),
diff --git a/src/cfnlint/rules/functions/Length.py b/src/cfnlint/rules/functions/Length.py
index 0f1a5dab6e..8f4b66a27d 100644
--- a/src/cfnlint/rules/functions/Length.py
+++ b/src/cfnlint/rules/functions/Length.py
@@ -31,10 +31,8 @@ def fn_length(
     ) -> ValidationResult:
         if not validator.context.transforms.has_language_extensions_transform():
             yield ValidationError(
-                (
-                    f"{self.fn.name} is not supported without "
-                    "'AWS::LanguageExtensions' transform"
-                ),
+                f"{self.fn.name} is not supported without "
+                "'AWS::LanguageExtensions' transform",
                 validator=self.fn.py,
                 rule=self,
             )
diff --git a/src/cfnlint/rules/functions/Sub.py b/src/cfnlint/rules/functions/Sub.py
index 17675c5a0a..39eaa14632 100644
--- a/src/cfnlint/rules/functions/Sub.py
+++ b/src/cfnlint/rules/functions/Sub.py
@@ -82,7 +82,6 @@ def _validate_string(
     def fn_sub(
         self, validator: Validator, s: Any, instance: Any, schema: Any
     ) -> ValidationResult:
-
         errs = list(super().validate(validator, s, instance, schema))
         if errs:
             yield from iter(errs)
diff --git a/src/cfnlint/rules/functions/SubNotJoin.py b/src/cfnlint/rules/functions/SubNotJoin.py
index eefc226254..4cc3fda09d 100644
--- a/src/cfnlint/rules/functions/SubNotJoin.py
+++ b/src/cfnlint/rules/functions/SubNotJoin.py
@@ -56,7 +56,7 @@ def validate(
 
         if self._check_elements(value[1]):
             yield ValidationError(
-                ("Prefer using Fn::Sub over Fn::Join with an empty delimiter"),
+                "Prefer using Fn::Sub over Fn::Join with an empty delimiter",
                 path=deque([key, 0]),
                 rule=self,
             )
diff --git a/src/cfnlint/rules/functions/ToJsonString.py b/src/cfnlint/rules/functions/ToJsonString.py
index f2ac32d2ba..c71c0e4832 100644
--- a/src/cfnlint/rules/functions/ToJsonString.py
+++ b/src/cfnlint/rules/functions/ToJsonString.py
@@ -33,10 +33,8 @@ def fn_tojsonstring(
     ) -> ValidationResult:
         if not validator.context.transforms.has_language_extensions_transform():
             yield ValidationError(
-                (
-                    f"{self.fn.name} is not supported without "
-                    f"{TRANSFORM_LANGUAGE_EXTENSION!r} transform"
-                ),
+                f"{self.fn.name} is not supported without "
+                f"{TRANSFORM_LANGUAGE_EXTENSION!r} transform",
                 validator=self.fn.py,
                 rule=self,
             )
diff --git a/src/cfnlint/rules/functions/_BaseFn.py b/src/cfnlint/rules/functions/_BaseFn.py
index 5ef528da75..be256cf58f 100644
--- a/src/cfnlint/rules/functions/_BaseFn.py
+++ b/src/cfnlint/rules/functions/_BaseFn.py
@@ -138,7 +138,6 @@ def resolve(
         yield from iter(all_errs)
 
     def _resolve_ref(self, validator, schema) -> Any:
-
         resolve = getattr(validator.resolver, "resolve", None)
         ref = schema["$ref"]
         if resolve is None:
diff --git a/src/cfnlint/rules/helpers/get_resource_by_name.py b/src/cfnlint/rules/helpers/get_resource_by_name.py
index c8f9327900..b9e9d64028 100644
--- a/src/cfnlint/rules/helpers/get_resource_by_name.py
+++ b/src/cfnlint/rules/helpers/get_resource_by_name.py
@@ -16,7 +16,6 @@
 def get_resource_by_name(
     validator: Validator, name: str, types: Sequence[str] | None = None
 ) -> tuple[Any, Validator]:
-
     resource = validator.context.resources.get(name)
     if not resource:
         return None, validator
diff --git a/src/cfnlint/rules/helpers/get_value_from_path.py b/src/cfnlint/rules/helpers/get_value_from_path.py
index b5bcb61fad..0c216adf8b 100644
--- a/src/cfnlint/rules/helpers/get_value_from_path.py
+++ b/src/cfnlint/rules/helpers/get_value_from_path.py
@@ -83,10 +83,13 @@ def get_value_from_path(
         if fn_k == "Fn::If":
             yield from _get_relationship_fn_if(validator, fn_k, fn_v, path)
         elif fn_k == "Ref" and fn_v == "AWS::NoValue":
-            yield None, validator.evolve(
-                context=validator.context.evolve(
-                    path=validator.context.path.descend(path=fn_k)
-                )
+            yield (
+                None,
+                validator.evolve(
+                    context=validator.context.evolve(
+                        path=validator.context.path.descend(path=fn_k)
+                    )
+                ),
             )
         elif not path:
             yield instance, validator
diff --git a/src/cfnlint/rules/jsonschema/MaxProperties.py b/src/cfnlint/rules/jsonschema/MaxProperties.py
index cdbc96118a..88b2279922 100644
--- a/src/cfnlint/rules/jsonschema/MaxProperties.py
+++ b/src/cfnlint/rules/jsonschema/MaxProperties.py
@@ -30,10 +30,8 @@ def maxProperties(self, validator, mP, instance, schema):
         percent = len(instance) / mP
         if percent > 1:
             yield ValidationError(
-                (
-                    f"{validator.context.path.path_string!r} "
-                    f"has more than {mP!r} properties"
-                )
+                f"{validator.context.path.path_string!r} "
+                f"has more than {mP!r} properties"
             )
             return
         if percent > self.config["threshold"]:
@@ -49,9 +47,7 @@ def maxProperties(self, validator, mP, instance, schema):
                 return
 
             yield ValidationError(
-                (
-                    f"{validator.context.path.path_string!r} "
-                    f"is approaching the limit of {mP!r} properties"
-                ),
+                f"{validator.context.path.path_string!r} "
+                f"is approaching the limit of {mP!r} properties",
                 rule=rule,
             )
diff --git a/src/cfnlint/rules/mappings/Used.py b/src/cfnlint/rules/mappings/Used.py
index 0c2488b3fc..5391174174 100644
--- a/src/cfnlint/rules/mappings/Used.py
+++ b/src/cfnlint/rules/mappings/Used.py
@@ -26,7 +26,7 @@ def match(self, cfn: Template) -> RuleMatches:
         k, _ = is_function(mappings)
         if k == "Fn::Transform":
             self.logger.debug(
-                (f"Mapping Name has a transform. Disabling check {self.id!r}"),
+                f"Mapping Name has a transform. Disabling check {self.id!r}",
             )
             return matches
 
@@ -38,10 +38,8 @@ def match(self, cfn: Template) -> RuleMatches:
                     map_name = maptree[-1][0]
                     if isinstance(map_name, dict):
                         self.logger.debug(
-                            (
-                                "Mapping Name has a function that can have too many"
-                                " variations. Disabling check %s"
-                            ),
+                            "Mapping Name has a function that can have too many"
+                            " variations. Disabling check %s",
                             self.id,
                         )
                         return matches
diff --git a/src/cfnlint/rules/outputs/Condition.py b/src/cfnlint/rules/outputs/Condition.py
index 70deb34ef3..9231b6096e 100644
--- a/src/cfnlint/rules/outputs/Condition.py
+++ b/src/cfnlint/rules/outputs/Condition.py
@@ -10,7 +10,6 @@
 
 
 class Condition(CfnLintJsonSchema):
-
     id = "E6005"
     shortdesc = "Validate the Output condition is valid"
     description = (
diff --git a/src/cfnlint/rules/outputs/ImportValue.py b/src/cfnlint/rules/outputs/ImportValue.py
index 42de0192e7..60a4f6579a 100644
--- a/src/cfnlint/rules/outputs/ImportValue.py
+++ b/src/cfnlint/rules/outputs/ImportValue.py
@@ -32,7 +32,7 @@ def validate(
             ):
                 key = list(instance.keys())[0]
                 yield ValidationError(
-                    (f"The output value {instance!r} is an import from another output"),
+                    f"The output value {instance!r} is an import from another output",
                     rule=self,
                     path=deque([key]),
                 )
diff --git a/src/cfnlint/rules/parameter_files/Configuration.py b/src/cfnlint/rules/parameter_files/Configuration.py
index 532d5d8dcb..6ed92819e2 100644
--- a/src/cfnlint/rules/parameter_files/Configuration.py
+++ b/src/cfnlint/rules/parameter_files/Configuration.py
@@ -9,7 +9,6 @@
 
 
 class Configuration(BaseJsonSchema):
-
     id = "E0200"
     shortdesc = "Validate parameter file configuration"
     description = (
diff --git a/src/cfnlint/rules/parameters/AllowedPattern.py b/src/cfnlint/rules/parameters/AllowedPattern.py
index 0a93923453..0b7d392dcd 100644
--- a/src/cfnlint/rules/parameters/AllowedPattern.py
+++ b/src/cfnlint/rules/parameters/AllowedPattern.py
@@ -12,7 +12,6 @@
 
 
 class AllowedPattern(CfnLintKeyword):
-
     id = "I2003"
     shortdesc = "Validate AllowedPattern is a valid regexs"
     description = (
@@ -33,7 +32,6 @@ def __init__(self) -> None:
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         if not validator.is_type(instance, "string"):
             return
 
diff --git a/src/cfnlint/rules/parameters/NoEcho.py b/src/cfnlint/rules/parameters/NoEcho.py
index c98eb9afe1..bedcfc5142 100644
--- a/src/cfnlint/rules/parameters/NoEcho.py
+++ b/src/cfnlint/rules/parameters/NoEcho.py
@@ -35,10 +35,8 @@ def validate(self, validator: Validator, _, instance: Any, schema: Any):
                     and validator.context.path.path[2] == "Metadata"
                 ):
                     yield ValidationError(
-                        (
-                            f"Don't use 'NoEcho' parameter {instance!r} "
-                            "in resource metadata"
-                        ),
+                        f"Don't use 'NoEcho' parameter {instance!r} "
+                        "in resource metadata",
                         rule=self,
                         path=deque(["Ref"]),
                     )
@@ -46,10 +44,8 @@ def validate(self, validator: Validator, _, instance: Any, schema: Any):
             if len(validator.context.path.path) > 0:
                 if validator.context.path.path[0] in ["Metadata", "Outputs"]:
                     yield ValidationError(
-                        (
-                            f"Don't use 'NoEcho' parameter {instance!r} "
-                            f"in {validator.context.path.path[0]!r}"
-                        ),
+                        f"Don't use 'NoEcho' parameter {instance!r} "
+                        f"in {validator.context.path.path[0]!r}",
                         rule=self,
                         path=deque(["Ref"]),
                     )
diff --git a/src/cfnlint/rules/parameters/NumberRange.py b/src/cfnlint/rules/parameters/NumberRange.py
index 5df2bcfa66..afd6ad5026 100644
--- a/src/cfnlint/rules/parameters/NumberRange.py
+++ b/src/cfnlint/rules/parameters/NumberRange.py
@@ -12,7 +12,7 @@ class NumberRange(CloudFormationLintRule):
     id = "W3034"
     shortdesc = "Check if parameter values are between min and max"
     description = (
-        "Check if parameter values value being between the minimum" " and maximum"
+        "Check if parameter values value being between the minimum and maximum"
     )
     source_url = "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#number-size"
     tags = ["resources", "property", "number", "size"]
diff --git a/src/cfnlint/rules/resources/Condition.py b/src/cfnlint/rules/resources/Condition.py
index 0de70608ab..e7c65f2ce6 100644
--- a/src/cfnlint/rules/resources/Condition.py
+++ b/src/cfnlint/rules/resources/Condition.py
@@ -10,7 +10,6 @@
 
 
 class Condition(CfnLintJsonSchema):
-
     id = "E3015"
     shortdesc = "Validate the resource condition is valid"
     description = (
diff --git a/src/cfnlint/rules/resources/Configuration.py b/src/cfnlint/rules/resources/Configuration.py
index 5df75b70c6..393474c379 100644
--- a/src/cfnlint/rules/resources/Configuration.py
+++ b/src/cfnlint/rules/resources/Configuration.py
@@ -59,7 +59,6 @@ def _pattern_properties(
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: Any
     ) -> ValidationResult:
-
         cfn_validator = self.extend_validator(
             validator=validator,
             schema=self._schema,
diff --git a/src/cfnlint/rules/resources/CreationPolicy.py b/src/cfnlint/rules/resources/CreationPolicy.py
index 862e61da97..4fdc8209bd 100644
--- a/src/cfnlint/rules/resources/CreationPolicy.py
+++ b/src/cfnlint/rules/resources/CreationPolicy.py
@@ -60,7 +60,6 @@ def _get_schema(self, resource_type: str) -> dict[str, Any]:
                 },
             }
         if resource_type == "AWS::CloudFormation::WaitCondition":
-
             return {
                 "type": "object",
                 "additionalProperties": False,
diff --git a/src/cfnlint/rules/resources/Metadata.py b/src/cfnlint/rules/resources/Metadata.py
index 5c7c715b68..7b96df67e3 100644
--- a/src/cfnlint/rules/resources/Metadata.py
+++ b/src/cfnlint/rules/resources/Metadata.py
@@ -18,8 +18,7 @@ class Metadata(CfnLintJsonSchema):
     id = "E3028"
     shortdesc = "Validate the metadata section of a resource"
     description = (
-        "The metadata section can be unstructured but we do "
-        "validate the items we can"
+        "The metadata section can be unstructured but we do validate the items we can"
     )
     source_url = "https://github.com/aws-cloudformation/cfn-lint"
     tags = ["resources"]
diff --git a/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py b/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
index 208408e94c..10a6e81367 100644
--- a/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
+++ b/src/cfnlint/rules/resources/RetentionPeriodOnResourceTypesWithAutoExpiringContent.py
@@ -50,47 +50,63 @@ def __init__(self) -> None:
             "AWS::Kinesis::Stream": [
                 {
                     "Attribute": "RetentionPeriodHours",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-retentionperiodhours",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-kinesis-stream.html#cfn-kinesis-stream-retentionperiodhours"
+                    ),
                 }
             ],
             "AWS::SQS::Queue": [
                 {
                     "Attribute": "MessageRetentionPeriod",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-msgretentionperiod",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-queues.html#aws-sqs-queue-msgretentionperiod"
+                    ),
                 }
             ],
             "AWS::DocDB::DBCluster": [
                 {
                     "Attribute": "BackupRetentionPeriod",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-backupretentionperiod",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html#cfn-docdb-dbcluster-backupretentionperiod"
+                    ),
                 }
             ],
             "AWS::Synthetics::Canary": [
                 {
                     "Attribute": "SuccessRetentionPeriod",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-successretentionperiod",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-successretentionperiod"
+                    ),
                 },
                 {
                     "Attribute": "FailureRetentionPeriod",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-failureretentionperiod",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-synthetics-canary.html#cfn-synthetics-canary-failureretentionperiod"
+                    ),
                 },
             ],
             "AWS::Redshift::Cluster": [
                 {
                     "Attribute": "AutomatedSnapshotRetentionPeriod",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-cluster.html#cfn-redshift-cluster-automatedsnapshotretentionperiod",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-cluster.html#cfn-redshift-cluster-automatedsnapshotretentionperiod"
+                    ),
                 }
             ],
             "AWS::RDS::DBInstance": [
                 {
                     "Attribute": "BackupRetentionPeriod",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-backupretentionperiod",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-backupretentionperiod"
+                    ),
                 }
             ],
             "AWS::RDS::DBCluster": [
                 {
                     "Attribute": "BackupRetentionPeriod",
-                    "SourceUrl": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-backuprententionperiod",
+                    "SourceUrl": (
+                        "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-backuprententionperiod"
+                    ),
                 }
             ],
         }
diff --git a/src/cfnlint/rules/resources/ServerlessTransform.py b/src/cfnlint/rules/resources/ServerlessTransform.py
index ae88dd33e7..a930bc1c4a 100644
--- a/src/cfnlint/rules/resources/ServerlessTransform.py
+++ b/src/cfnlint/rules/resources/ServerlessTransform.py
@@ -36,9 +36,7 @@ def validate(
 
         if instance.startswith("AWS::Serverless::"):
             yield ValidationError(
-                (
-                    f"{instance!r} type used without the "
-                    f"serverless transform {TRANSFORM_SAM!r}"
-                ),
+                f"{instance!r} type used without the "
+                f"serverless transform {TRANSFORM_SAM!r}",
                 rule=self,
             )
diff --git a/src/cfnlint/rules/resources/apigateway/RestApiMixingDefinitions.py b/src/cfnlint/rules/resources/apigateway/RestApiMixingDefinitions.py
index 86c5fa34fa..108c0f64ab 100644
--- a/src/cfnlint/rules/resources/apigateway/RestApiMixingDefinitions.py
+++ b/src/cfnlint/rules/resources/apigateway/RestApiMixingDefinitions.py
@@ -41,7 +41,6 @@ def __init__(self) -> None:
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         if validator.cfn.graph is None:  # pragma: no cover
             return  # pragma: no cover
 
diff --git a/src/cfnlint/rules/resources/backup/BackupPlanLifecycleRule.py b/src/cfnlint/rules/resources/backup/BackupPlanLifecycleRule.py
index 74f081525c..8df7966edd 100644
--- a/src/cfnlint/rules/resources/backup/BackupPlanLifecycleRule.py
+++ b/src/cfnlint/rules/resources/backup/BackupPlanLifecycleRule.py
@@ -47,11 +47,9 @@ def validate(
             return
         if delete_after_days - move_to_cold_storage_after_days < 90:
             yield ValidationError(
-                (
-                    f"DeleteAfterDays {delete_after_days!r} must be at least "
-                    "90 days after MoveToColdStorageAfterDays "
-                    f"{move_to_cold_storage_after_days}"
-                ),
+                f"DeleteAfterDays {delete_after_days!r} must be at least "
+                "90 days after MoveToColdStorageAfterDays "
+                f"{move_to_cold_storage_after_days}",
                 path=deque(["DeleteAfterDays"]),
                 rule=self,
             )
diff --git a/src/cfnlint/rules/resources/certificatemanager/DomainValidationOptions.py b/src/cfnlint/rules/resources/certificatemanager/DomainValidationOptions.py
index f594bdd84d..c02d01f2e6 100644
--- a/src/cfnlint/rules/resources/certificatemanager/DomainValidationOptions.py
+++ b/src/cfnlint/rules/resources/certificatemanager/DomainValidationOptions.py
@@ -54,10 +54,8 @@ def validate(
 
                 if not domain_name.endswith("." + validation_domain):
                     yield ValidationError(
-                        (
-                            f"{validation_domain!r} must be a "
-                            f"superdomain of {domain_name!r}"
-                        ),
+                        f"{validation_domain!r} must be a "
+                        f"superdomain of {domain_name!r}",
                         path=deque(["DomainName"]),
                         instance=domain_name,
                     )
diff --git a/src/cfnlint/rules/resources/cloudfront/Aliases.py b/src/cfnlint/rules/resources/cloudfront/Aliases.py
index 3f51404cdc..e32c9b5554 100644
--- a/src/cfnlint/rules/resources/cloudfront/Aliases.py
+++ b/src/cfnlint/rules/resources/cloudfront/Aliases.py
@@ -34,7 +34,6 @@ def __init__(self):
     def validate(
         self, validator: Validator, _, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         if isinstance(instance, str):
             if re.match(REGEX_DYN_REF, instance):
                 return
@@ -51,7 +50,9 @@ def validate(
                 instance=instance,
                 schema={
                     # ruff: noqa: E501
-                    "pattern": "^(?:[a-z0-9\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$",
+                    "pattern": (
+                        "^(?:[a-z0-9\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$"
+                    ),
                 },
             ):
                 err.rule = self
diff --git a/src/cfnlint/rules/resources/cloudfront/DistributionTargetOriginId.py b/src/cfnlint/rules/resources/cloudfront/DistributionTargetOriginId.py
index cf4bf4385b..c18c1547cb 100644
--- a/src/cfnlint/rules/resources/cloudfront/DistributionTargetOriginId.py
+++ b/src/cfnlint/rules/resources/cloudfront/DistributionTargetOriginId.py
@@ -34,7 +34,6 @@ def __init__(self):
     def validate(
         self, validator: Validator, _, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for cache_origin_id, cache_validator in get_value_from_path(
             validator, instance, path=deque(["DefaultCacheBehavior", "TargetOriginId"])
         ):
diff --git a/src/cfnlint/rules/resources/codebuild/ProjectS3Location.py b/src/cfnlint/rules/resources/codebuild/ProjectS3Location.py
index f619bf2d7f..6c24224570 100644
--- a/src/cfnlint/rules/resources/codebuild/ProjectS3Location.py
+++ b/src/cfnlint/rules/resources/codebuild/ProjectS3Location.py
@@ -15,7 +15,7 @@
 class ProjectS3Location(CfnLintJsonSchema):
     id = "E3636"
     shortdesc = "Validate CodeBuild projects using S3 also have Location"
-    description = "When using 'S3' for 'Type' then you must also specify " "'Location'"
+    description = "When using 'S3' for 'Type' then you must also specify 'Location'"
     tags = ["resources", "codebuild"]
 
     def __init__(self) -> None:
diff --git a/src/cfnlint/rules/resources/codepipeline/PipelineActionConfiguration.py b/src/cfnlint/rules/resources/codepipeline/PipelineActionConfiguration.py
index 6c138fcfc5..bb4a8f3876 100644
--- a/src/cfnlint/rules/resources/codepipeline/PipelineActionConfiguration.py
+++ b/src/cfnlint/rules/resources/codepipeline/PipelineActionConfiguration.py
@@ -54,10 +54,8 @@ def validate(
                 input_artficat_names.add(input_name)
             else:
                 yield ValidationError(
-                    (
-                        f"{template_path.split('::')[0]!r} is not "
-                        f"one of {list(input_artficat_names)!r}"
-                    ),
+                    f"{template_path.split('::')[0]!r} is not "
+                    f"one of {list(input_artficat_names)!r}",
                     validator="enum",
                     rule=self,
                     path_override=template_path_validator.context.path.path,
diff --git a/src/cfnlint/rules/resources/ecs/FargateDeploymentSchedulingStrategy.py b/src/cfnlint/rules/resources/ecs/FargateDeploymentSchedulingStrategy.py
index cc7b29c004..cb67c7717c 100644
--- a/src/cfnlint/rules/resources/ecs/FargateDeploymentSchedulingStrategy.py
+++ b/src/cfnlint/rules/resources/ecs/FargateDeploymentSchedulingStrategy.py
@@ -16,7 +16,7 @@ class FargateDeploymentSchedulingStrategy(CfnLintJsonSchema):
         "use SchedulingStrategy of REPLICA"
     )
     description = (
-        "When using a LaunchType of Fargate the SchedulingStrategy " "has to be Replica"
+        "When using a LaunchType of Fargate the SchedulingStrategy has to be Replica"
     )
     source_url = "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-schedulingstrategy"
     tags = ["properties", "ecs", "service", "container", "fargate"]
diff --git a/src/cfnlint/rules/resources/ecs/ServiceDynamicPorts.py b/src/cfnlint/rules/resources/ecs/ServiceDynamicPorts.py
index 4c3203316a..3316f69d87 100644
--- a/src/cfnlint/rules/resources/ecs/ServiceDynamicPorts.py
+++ b/src/cfnlint/rules/resources/ecs/ServiceDynamicPorts.py
@@ -183,7 +183,6 @@ def _filter_port_mappings(
     def validate(
         self, validator: Validator, _: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for (
             task_definition_resource_name,
             lb_container_name,
diff --git a/src/cfnlint/rules/resources/ecs/ServiceFargate.py b/src/cfnlint/rules/resources/ecs/ServiceFargate.py
index 3de5ff02cb..67b2c40174 100644
--- a/src/cfnlint/rules/resources/ecs/ServiceFargate.py
+++ b/src/cfnlint/rules/resources/ecs/ServiceFargate.py
@@ -87,7 +87,6 @@ def _get_task_definition_properties(
                 task_definition,
                 path=deque(["Properties", "NetworkMode"]),
             ):
-
                 if network_mode == "awsvpc" or network_mode_validator.is_type(
                     network_mode, "object"
                 ):
@@ -110,7 +109,6 @@ def _get_task_definition_properties(
     def validate(
         self, validator: Validator, _: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for (
             task_definition_resource_name,
             launch_type,
diff --git a/src/cfnlint/rules/resources/ecs/ServiceHealthCheckGracePeriodSeconds.py b/src/cfnlint/rules/resources/ecs/ServiceHealthCheckGracePeriodSeconds.py
index 6510a9c846..f586f96c80 100644
--- a/src/cfnlint/rules/resources/ecs/ServiceHealthCheckGracePeriodSeconds.py
+++ b/src/cfnlint/rules/resources/ecs/ServiceHealthCheckGracePeriodSeconds.py
@@ -40,7 +40,6 @@ def __init__(self) -> None:
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         cfn_validator = self.extend_validator(
             validator=validator.evolve(
                 function_filter=validator.function_filter.evolve(
diff --git a/src/cfnlint/rules/resources/ecs/ServiceNetworkConfiguration.py b/src/cfnlint/rules/resources/ecs/ServiceNetworkConfiguration.py
index 0a2d19e45c..1e9fbc1316 100644
--- a/src/cfnlint/rules/resources/ecs/ServiceNetworkConfiguration.py
+++ b/src/cfnlint/rules/resources/ecs/ServiceNetworkConfiguration.py
@@ -86,7 +86,6 @@ def _get_task_definition_properties(
     def validate(
         self, validator: Validator, _: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for (
             task_definition_resource_name,
             network_configuration,
diff --git a/src/cfnlint/rules/resources/ecs/TaskDefinitionAwsVpc.py b/src/cfnlint/rules/resources/ecs/TaskDefinitionAwsVpc.py
index 603088ff56..6134c4e5e9 100644
--- a/src/cfnlint/rules/resources/ecs/TaskDefinitionAwsVpc.py
+++ b/src/cfnlint/rules/resources/ecs/TaskDefinitionAwsVpc.py
@@ -18,8 +18,7 @@ class TaskDefinitionAwsVpc(CfnLintKeyword):
     id = "E3053"
     shortdesc = "Validate ECS task definition is has correct values for 'HostPort'"
     description = (
-        "The 'HostPort' must either be undefined or equal to "
-        "the 'ContainerPort' value"
+        "The 'HostPort' must either be undefined or equal to the 'ContainerPort' value"
     )
     tags = ["resources", "ecs"]
 
@@ -31,7 +30,6 @@ def __init__(self) -> None:
     def _get_port_mappings(
         self, validator: Validator, instance: Any
     ) -> Iterator[tuple[str | int | None, str | int | None, Validator]]:
-
         for container_definition, container_definition_validator in get_value_from_path(
             validator,
             instance,
@@ -57,7 +55,6 @@ def _get_port_mappings(
     def validate(
         self, validator: Validator, _: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for network_mode, _ in get_value_from_path(
             validator,
             instance,
diff --git a/src/cfnlint/rules/resources/ectwo/Ebs.py b/src/cfnlint/rules/resources/ectwo/Ebs.py
index fe21a12204..2057be8e2c 100644
--- a/src/cfnlint/rules/resources/ectwo/Ebs.py
+++ b/src/cfnlint/rules/resources/ectwo/Ebs.py
@@ -44,6 +44,6 @@ def message(self, instance: Any, err: ValidationError) -> str:
                 )
 
         return (
-            f"'Iops' is a required property when 'VolumeType' has a value "
+            "'Iops' is a required property when 'VolumeType' has a value "
             f"of {instance.get('VolumeType')!r}"
         )
diff --git a/src/cfnlint/rules/resources/ectwo/InstanceImageId.py b/src/cfnlint/rules/resources/ectwo/InstanceImageId.py
index db809da416..fc31d8342b 100644
--- a/src/cfnlint/rules/resources/ectwo/InstanceImageId.py
+++ b/src/cfnlint/rules/resources/ectwo/InstanceImageId.py
@@ -34,7 +34,6 @@ def __init__(self) -> None:
     def _get_related_launch_template(
         self, validator: Validator, instance: Any
     ) -> Iterator[tuple[Any, Validator]]:
-
         for launch_template, launch_template_validator in get_value_from_path(
             validator, instance, deque(["LaunchTemplate"])
         ):
@@ -55,7 +54,6 @@ def _get_related_launch_template(
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for (
             instance_image_id,
             instance_image_id_validator,
diff --git a/src/cfnlint/rules/resources/ectwo/VpcSubnetCidr.py b/src/cfnlint/rules/resources/ectwo/VpcSubnetCidr.py
index 9266908ff5..2e699502cf 100644
--- a/src/cfnlint/rules/resources/ectwo/VpcSubnetCidr.py
+++ b/src/cfnlint/rules/resources/ectwo/VpcSubnetCidr.py
@@ -85,7 +85,6 @@ def _get_vpc_cidrs(
                 instance,
                 deque([key]),
             ):
-
                 if cidr is None:
                     continue
                 yield self._create_network(cidr), cidr_validator
@@ -93,7 +92,6 @@ def _get_vpc_cidrs(
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         if not validator.cfn.graph:
             return
 
@@ -190,7 +188,7 @@ def validate(
                                         f"{[f'{str(v)}' for v in vpc_ipv6_networks]!r}"
                                     )
                             yield ValidationError(
-                                (f"{str(subnet_network)!r} {reprs}"),
+                                f"{str(subnet_network)!r} {reprs}",
                                 rule=self,
                                 path_override=subnet_validator.context.path.path,
                             )
diff --git a/src/cfnlint/rules/resources/ectwo/VpcSubnetOverlap.py b/src/cfnlint/rules/resources/ectwo/VpcSubnetOverlap.py
index 2c61832d76..7b5d742503 100644
--- a/src/cfnlint/rules/resources/ectwo/VpcSubnetOverlap.py
+++ b/src/cfnlint/rules/resources/ectwo/VpcSubnetOverlap.py
@@ -70,11 +70,9 @@ def _create_network(self, cidr: Any) -> IPv4Network | IPv6Network | None:
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for vpc_id, vpc_validator in get_value_from_path(
             validator=validator, instance=instance, path=deque(["VpcId"])
         ):
-
             if not isinstance(vpc_id, (str, dict)):
                 return
 
@@ -96,7 +94,6 @@ def validate(
                 for cidr_block, cidr_block_validator in get_value_from_path(
                     validator=vpc_validator, instance=instance, path=deque([key])
                 ):
-
                     cidr_network = self._create_network(cidr_block)
                     if not cidr_network:
                         continue
@@ -121,10 +118,8 @@ def validate(
                             saved_subnet,
                         ):
                             yield ValidationError(
-                                (
-                                    f"{str(cidr_network)!r} overlaps "
-                                    f"with {str(saved_subnet)!r}"
-                                ),
+                                f"{str(cidr_network)!r} overlaps "
+                                f"with {str(saved_subnet)!r}",
                                 rule=self,
                                 path=deque(
                                     list(cidr_block_validator.context.path.path)[1:]
diff --git a/src/cfnlint/rules/resources/iam/Permissions.py b/src/cfnlint/rules/resources/iam/Permissions.py
index c789904872..0f20534ccc 100644
--- a/src/cfnlint/rules/resources/iam/Permissions.py
+++ b/src/cfnlint/rules/resources/iam/Permissions.py
@@ -53,10 +53,8 @@ def validate(
                 continue
             if ":" not in action:
                 yield ValidationError(
-                    (
-                        f"{action!r} is not a valid action. "
-                        "Must be of the form service:action or '*'"
-                    ),
+                    f"{action!r} is not a valid action. "
+                    "Must be of the form service:action or '*'",
                     rule=self,
                 )
                 return
@@ -76,10 +74,8 @@ def validate(
                         ]
                     ):
                         yield ValidationError(
-                            (
-                                f"{service!r} is not one of "
-                                f"{self._resource_action_limitations[validator.context.path.cfn_path[1]]!r}"
-                            ),
+                            f"{service!r} is not one of "
+                            f"{self._resource_action_limitations[validator.context.path.cfn_path[1]]!r}",
                             rule=self,
                         )
 
diff --git a/src/cfnlint/rules/resources/iam/ResourcePolicyResourceArn.py b/src/cfnlint/rules/resources/iam/ResourcePolicyResourceArn.py
index e6afdf0502..1167d06ae2 100644
--- a/src/cfnlint/rules/resources/iam/ResourcePolicyResourceArn.py
+++ b/src/cfnlint/rules/resources/iam/ResourcePolicyResourceArn.py
@@ -14,7 +14,6 @@
 
 
 class ResourcePolicyResourceArn(CfnLintKeyword):
-
     id = "E3514"
     shortdesc = "Validate IAM resource policy resource ARNs"
     description = "Validates an IAM resource policy has a compliant resource ARN"
diff --git a/src/cfnlint/rules/resources/iam/StatementResources.py b/src/cfnlint/rules/resources/iam/StatementResources.py
index 94db070e9a..a278717b38 100644
--- a/src/cfnlint/rules/resources/iam/StatementResources.py
+++ b/src/cfnlint/rules/resources/iam/StatementResources.py
@@ -19,7 +19,6 @@
 
 
 class _Arn:
-
     def __init__(self, full_arn: str):
         arn_parts = full_arn.split(":", 5)
 
@@ -75,7 +74,6 @@ def __eq__(self, value: Any):
 
 
 class StatementResources(CfnLintKeyword):
-
     id = "I3510"
     shortdesc = "Validate statement resources match the actions"
     description = (
@@ -95,7 +93,6 @@ def __init__(self):
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         if not validator.is_type(instance, "object"):
             return
 
@@ -128,7 +125,6 @@ def validate(
             actions = ensure_list(actions)
 
             for action in actions:
-
                 if not validator.is_type(action, "string"):
                     continue
                 if any(x in action for x in ["*", "?"]):
@@ -165,10 +161,7 @@ def validate(
                             break
                     else:
                         yield ValidationError(
-                            (
-                                f"action {action!r} requires "
-                                f"a resource of {arn_formats!r}"
-                            ),
+                            f"action {action!r} requires a resource of {arn_formats!r}",
                             path=deque(["Resource"]),
                             rule=self,
                         )
diff --git a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeCreate.py b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeCreate.py
index a1b89abc32..50de7acc08 100644
--- a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeCreate.py
+++ b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeCreate.py
@@ -15,7 +15,6 @@
 
 
 class DeprecatedRuntimeCreate(CfnLintKeyword):
-
     id = "E2531"
     shortdesc = "Validate if lambda runtime is deprecated"
     description = "Check the lambda runtime has reached the end of life"
@@ -48,11 +47,9 @@ def validate(
             > self.current_date
         ):
             yield ValidationError(
-                (
-                    f"Runtime {runtime!r} was deprecated on "
-                    f"{runtime_data['deprecated']!r}. Creation was disabled on "
-                    f"{runtime_data['create-block']!r} and update on "
-                    f"{runtime_data['update-block']!r}. Please consider "
-                    f"updating to {runtime_data['successor']!r}"
-                ),
+                f"Runtime {runtime!r} was deprecated on "
+                f"{runtime_data['deprecated']!r}. Creation was disabled on "
+                f"{runtime_data['create-block']!r} and update on "
+                f"{runtime_data['update-block']!r}. Please consider "
+                f"updating to {runtime_data['successor']!r}",
             )
diff --git a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEol.py b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEol.py
index 398f4be6ea..cbcf8e83e3 100644
--- a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEol.py
+++ b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeEol.py
@@ -15,7 +15,6 @@
 
 
 class DeprecatedRuntimeEol(CfnLintKeyword):
-
     id = "W2531"
     shortdesc = "Check if EOL Lambda Function Runtimes are used"
     description = (
@@ -52,11 +51,9 @@ def validate(
             > self.current_date
         ):
             yield ValidationError(
-                (
-                    f"Runtime {runtime!r} was deprecated on "
-                    f"{runtime_data['deprecated']!r}. Creation was disabled on "
-                    f"{runtime_data['create-block']!r} and update on "
-                    f"{runtime_data['update-block']!r}. Please consider "
-                    f"updating to {runtime_data['successor']!r}"
-                ),
+                f"Runtime {runtime!r} was deprecated on "
+                f"{runtime_data['deprecated']!r}. Creation was disabled on "
+                f"{runtime_data['create-block']!r} and update on "
+                f"{runtime_data['update-block']!r}. Please consider "
+                f"updating to {runtime_data['successor']!r}",
             )
diff --git a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeUpdate.py b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeUpdate.py
index 74d172525e..03b89e6491 100644
--- a/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeUpdate.py
+++ b/src/cfnlint/rules/resources/lmbd/DeprecatedRuntimeUpdate.py
@@ -15,7 +15,6 @@
 
 
 class DeprecatedRuntimeUpdate(CfnLintKeyword):
-
     id = "E2533"
     shortdesc = "Check if Lambda Function Runtimes are updatable"
     description = (
@@ -47,11 +46,9 @@ def validate(
             <= self.current_date
         ):
             yield ValidationError(
-                (
-                    f"Runtime {runtime!r} was deprecated on "
-                    f"{runtime_data['deprecated']!r}. Creation was disabled on "
-                    f"{runtime_data['create-block']!r} and update on "
-                    f"{runtime_data['update-block']!r}. Please consider "
-                    f"updating to {runtime_data['successor']!r}"
-                ),
+                f"Runtime {runtime!r} was deprecated on "
+                f"{runtime_data['deprecated']!r}. Creation was disabled on "
+                f"{runtime_data['create-block']!r} and update on "
+                f"{runtime_data['update-block']!r}. Please consider "
+                f"updating to {runtime_data['successor']!r}",
             )
diff --git a/src/cfnlint/rules/resources/lmbd/EventSourceMappingToSqsTimeout.py b/src/cfnlint/rules/resources/lmbd/EventSourceMappingToSqsTimeout.py
index 567ae5748e..5ffb0bc5a6 100644
--- a/src/cfnlint/rules/resources/lmbd/EventSourceMappingToSqsTimeout.py
+++ b/src/cfnlint/rules/resources/lmbd/EventSourceMappingToSqsTimeout.py
@@ -14,7 +14,6 @@
 
 
 class EventSourceMappingToSqsTimeout(CfnLintKeyword):
-
     id = "E3505"
     shortdesc = (
         "Validate SQS 'VisibilityTimeout' is greater than a function's 'Timeout'"
@@ -34,7 +33,6 @@ def __init__(self):
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         if validator.is_type(instance, "string"):
             try:
                 instance = int(instance)
@@ -87,7 +85,7 @@ def validate(
                             if visibility_timeout < instance:
                                 yield ValidationError(
                                     message=(
-                                        f"Queue visibility timeout "
+                                        "Queue visibility timeout "
                                         f"({visibility_timeout!r}) "
                                         "is less than Function timeout "
                                         f"({instance!r}) seconds"
diff --git a/src/cfnlint/rules/resources/lmbd/FunctionEnvironmentKeys.py b/src/cfnlint/rules/resources/lmbd/FunctionEnvironmentKeys.py
index 756398a27f..e50e641600 100644
--- a/src/cfnlint/rules/resources/lmbd/FunctionEnvironmentKeys.py
+++ b/src/cfnlint/rules/resources/lmbd/FunctionEnvironmentKeys.py
@@ -14,7 +14,6 @@
 
 
 class FunctionEnvironmentKeys(CfnLintJsonSchema):
-
     id = "E3663"
     shortdesc = "Validate Lambda environment variable names aren't reserved"
     description = (
diff --git a/src/cfnlint/rules/resources/lmbd/PermissionSourceAccount.py b/src/cfnlint/rules/resources/lmbd/PermissionSourceAccount.py
index 043ea94d9e..6ac0b01bd6 100644
--- a/src/cfnlint/rules/resources/lmbd/PermissionSourceAccount.py
+++ b/src/cfnlint/rules/resources/lmbd/PermissionSourceAccount.py
@@ -16,7 +16,6 @@
 
 
 class PermissionSourceAccount(CfnLintKeyword):
-
     id = "W3663"
     shortdesc = "Validate SourceAccount is required property"
     description = (
diff --git a/src/cfnlint/rules/resources/lmbd/SnapStart.py b/src/cfnlint/rules/resources/lmbd/SnapStart.py
index 9ca5150294..cfb2265e7c 100644
--- a/src/cfnlint/rules/resources/lmbd/SnapStart.py
+++ b/src/cfnlint/rules/resources/lmbd/SnapStart.py
@@ -45,8 +45,6 @@ def validate(
             return
 
         yield ValidationError(
-            (
-                f"'SnapStart' is enabled but an {lambda_version_type!r} "
-                "resource is not attached"
-            ),
+            f"'SnapStart' is enabled but an {lambda_version_type!r} "
+            "resource is not attached",
         )
diff --git a/src/cfnlint/rules/resources/lmbd/SnapStartSupported.py b/src/cfnlint/rules/resources/lmbd/SnapStartSupported.py
index 9be951bc0d..72647136b3 100644
--- a/src/cfnlint/rules/resources/lmbd/SnapStartSupported.py
+++ b/src/cfnlint/rules/resources/lmbd/SnapStartSupported.py
@@ -74,7 +74,6 @@ def _is_runtime_valid(self, runtime: str) -> bool:
     def validate(
         self, validator: Validator, _, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for scenario in validator.cfn.get_object_without_conditions(
             instance,
             ["Runtime", "SnapStart"],
@@ -103,10 +102,8 @@ def validate(
                     if region not in self.regions
                 ]
                 yield ValidationError(
-                    (
-                        "'SnapStart' enabled functions are not supported in "
-                        f"{unsupported_regions!r}"
-                    ),
+                    "'SnapStart' enabled functions are not supported in "
+                    f"{unsupported_regions!r}",
                     path=deque(["SnapStart", "ApplyOn"]),
                 )
 
diff --git a/src/cfnlint/rules/resources/properties/Password.py b/src/cfnlint/rules/resources/properties/Password.py
index ca7a1261f4..0430895bba 100644
--- a/src/cfnlint/rules/resources/properties/Password.py
+++ b/src/cfnlint/rules/resources/properties/Password.py
@@ -92,7 +92,7 @@ def match(self, cfn: Template) -> RuleMatches:
 
         for paramname in fix_params:
             message = (
-                f'Parameter {paramname["Name"]} used as {paramname["Use"]}, therefore'
+                f"Parameter {paramname['Name']} used as {paramname['Use']}, therefore"
                 " NoEcho should be True"
             )
             tree = ["Parameters", paramname["Name"]]
diff --git a/src/cfnlint/rules/resources/properties/Pattern.py b/src/cfnlint/rules/resources/properties/Pattern.py
index a8a2055b00..982fc216f9 100644
--- a/src/cfnlint/rules/resources/properties/Pattern.py
+++ b/src/cfnlint/rules/resources/properties/Pattern.py
@@ -39,7 +39,9 @@ def __init__(self):
         }
         self.configure()
 
-    def _is_exception(self, instance: str) -> bool:
+    def _is_exception(self, validator: Validator, instance: str) -> bool:
+        if not validator.context.allow_exceptions:
+            return False
         for exception in self.config["exceptions"]:
             if re.match(exception, instance):
                 return True
@@ -66,5 +68,5 @@ def pattern(
                 )
             return
         for err in pattern(validator, patrn, instance, schema):
-            if not self._is_exception(instance):
+            if not self._is_exception(validator, instance):
                 yield err
diff --git a/src/cfnlint/rules/resources/rds/DbClusterServerlessExclusive.py b/src/cfnlint/rules/resources/rds/DbClusterServerlessExclusive.py
index 3e66e62521..038eceeb2b 100644
--- a/src/cfnlint/rules/resources/rds/DbClusterServerlessExclusive.py
+++ b/src/cfnlint/rules/resources/rds/DbClusterServerlessExclusive.py
@@ -32,7 +32,6 @@ def __init__(self) -> None:
         )
 
     def message(self, instance: Any, err: ValidationError) -> str:
-
         # validator None means the schema is falsy
         if err.validator is None:
             if instance.get("EngineMode") in ["serverless", "provisioned"]:
@@ -41,6 +40,6 @@ def message(self, instance: Any, err: ValidationError) -> str:
                     f" doesn't allow additional properties {err.path[0]!r}"
                 )
             else:
-                return "Additional properties are not allowed " f"({err.path[0]!r})"
+                return f"Additional properties are not allowed ({err.path[0]!r})"
 
         return err.message
diff --git a/src/cfnlint/rules/resources/route53/RecordSetName.py b/src/cfnlint/rules/resources/route53/RecordSetName.py
index e0322ab4be..39de8fdac8 100644
--- a/src/cfnlint/rules/resources/route53/RecordSetName.py
+++ b/src/cfnlint/rules/resources/route53/RecordSetName.py
@@ -52,10 +52,8 @@ def validate(
 
                 if name != hz_name and not name.endswith(f".{hz_name}"):
                     yield ValidationError(
-                        (
-                            f"{props.get('Name')!r} must be a subdomain "
-                            f"of or equal to {props.get('HostedZoneName')!r}"
-                        ),
+                        f"{props.get('Name')!r} must be a subdomain "
+                        f"of or equal to {props.get('HostedZoneName')!r}",
                         path=deque(["Name"]),
                         instance=props.get("Name"),
                     )
diff --git a/src/cfnlint/rules/resources/s3/AccessControlObsolete.py b/src/cfnlint/rules/resources/s3/AccessControlObsolete.py
index f51081f40a..c3c6e3b91c 100644
--- a/src/cfnlint/rules/resources/s3/AccessControlObsolete.py
+++ b/src/cfnlint/rules/resources/s3/AccessControlObsolete.py
@@ -40,10 +40,8 @@ def validate(
             access_control = props.get("AccessControl", None)
             if access_control:
                 yield ValidationError(
-                    (
-                        "'AccessControl' is a legacy property. Consider "
-                        "using 'AWS::S3::BucketPolicy' instead"
-                    ),
+                    "'AccessControl' is a legacy property. Consider "
+                    "using 'AWS::S3::BucketPolicy' instead",
                     path=deque(["AccessControl"]),
                     instance=access_control,
                 )
diff --git a/src/cfnlint/rules/resources/s3/BucketTieringConfiguration.py b/src/cfnlint/rules/resources/s3/BucketTieringConfiguration.py
index 6e09db82ab..f6b8927855 100644
--- a/src/cfnlint/rules/resources/s3/BucketTieringConfiguration.py
+++ b/src/cfnlint/rules/resources/s3/BucketTieringConfiguration.py
@@ -44,7 +44,6 @@ def __init__(self):
     def validate(
         self, validator: Validator, _, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for archive_access, archive_access_validator in get_value_from_path(
             validator, instance, deque(["AccessTier"])
         ):
diff --git a/src/cfnlint/rules/resources/sqs/QueueDLQ.py b/src/cfnlint/rules/resources/sqs/QueueDLQ.py
index 7c13bfc598..dc483d7fc1 100644
--- a/src/cfnlint/rules/resources/sqs/QueueDLQ.py
+++ b/src/cfnlint/rules/resources/sqs/QueueDLQ.py
@@ -51,13 +51,13 @@ def _is_fifo_queue(
             validator=validator, instance=instance, path=deque(["FifoQueue"])
         ):
             yield (
-                fifo if bool_compare(queue_type, True) else standard
-            ), queue_type_validator
+                (fifo if bool_compare(queue_type, True) else standard),
+                queue_type_validator,
+            )
 
     def validate(
         self, validator: Validator, _: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         for queue_type, queue_type_validator in self._is_fifo_queue(
             validator=validator,
             instance=instance,
@@ -94,10 +94,8 @@ def validate(
                 ):
                     if queue_type != dest_queue_type:
                         yield ValidationError(
-                            (
-                                f"Source queue type {queue_type!r} does not "
-                                f"match destination queue type {dest_queue_type!r}"
-                            ),
+                            f"Source queue type {queue_type!r} does not "
+                            f"match destination queue type {dest_queue_type!r}",
                             rule=self,
                             path=target_validator.context.path.path,
                         )
diff --git a/src/cfnlint/rules/resources/stepfunctions/StateMachineDefinition.py b/src/cfnlint/rules/resources/stepfunctions/StateMachineDefinition.py
index 02b30c31fc..27ee21d7ce 100644
--- a/src/cfnlint/rules/resources/stepfunctions/StateMachineDefinition.py
+++ b/src/cfnlint/rules/resources/stepfunctions/StateMachineDefinition.py
@@ -110,7 +110,6 @@ def _validate_step(
         add_path_to_message: bool,
         k: str,
     ) -> ValidationResult:
-
         for err in validator.iter_errors(value):
             if validator.is_type(err.instance, "string"):
                 if (
@@ -137,7 +136,6 @@ def _validate_step(
     def validate(
         self, validator: Validator, keywords: Any, instance: Any, schema: dict[str, Any]
     ) -> ValidationResult:
-
         definition_keys = ["Definition"]
         if not validator.cfn.has_serverless_transform():
             definition_keys.append("DefinitionString")
diff --git a/src/cfnlint/rules/templates/Description.py b/src/cfnlint/rules/templates/Description.py
index 7d3bfaa739..e46dee6cfb 100644
--- a/src/cfnlint/rules/templates/Description.py
+++ b/src/cfnlint/rules/templates/Description.py
@@ -4,7 +4,8 @@
 """
 
 import cfnlint.data.schemas.other.template
-from cfnlint.rules import CfnLintJsonSchema, SchemaDetails
+from cfnlint.rules import SchemaDetails
+from cfnlint.rules.jsonschema.CfnLintJsonSchema import CfnLintJsonSchema
 
 
 class Description(CfnLintJsonSchema):
diff --git a/src/cfnlint/runner/deployment_file/deployment.py b/src/cfnlint/runner/deployment_file/deployment.py
index b2a45d4a16..52b704a538 100644
--- a/src/cfnlint/runner/deployment_file/deployment.py
+++ b/src/cfnlint/runner/deployment_file/deployment.py
@@ -11,7 +11,6 @@
 
 @dataclass(frozen=True)
 class DeploymentFileData:
-
     template_file_path: str = field()
     parameters: dict[str, Any] = field(default_factory=dict)
     tags: dict[str, str] = field(default_factory=dict)
diff --git a/src/cfnlint/runner/deployment_file/deployment_types/git_sync.py b/src/cfnlint/runner/deployment_file/deployment_types/git_sync.py
index 8edf87fd30..671efafa3e 100644
--- a/src/cfnlint/runner/deployment_file/deployment_types/git_sync.py
+++ b/src/cfnlint/runner/deployment_file/deployment_types/git_sync.py
@@ -17,7 +17,6 @@
 def create_deployment_from_git_sync(
     data: dict[str, Any],
 ) -> tuple[DeploymentFileData | None, RuleMatches | None]:
-
     schema = load_resource(cfnlint.data.schemas.other.deployment_files, "git_sync.json")
     matches = Configuration().validate_deployment_file(data, schema)
     if matches:
diff --git a/src/cfnlint/runner/deployment_file/runner.py b/src/cfnlint/runner/deployment_file/runner.py
index 2938273a5a..a70f3f5a32 100644
--- a/src/cfnlint/runner/deployment_file/runner.py
+++ b/src/cfnlint/runner/deployment_file/runner.py
@@ -23,7 +23,6 @@
 def _parse_deployment_file(
     filename: str,
 ) -> DeploymentFileData | list[Match]:
-
     data, matches = decode(filename)
 
     if data is None:
@@ -88,10 +87,8 @@ def expand_deployment_files(
             )
         except ValueError:
             LOGGER.debug(
-                (
-                    f"Template file path {deployment_data.template_file_path!r} "
-                    "is not relative to the current working directory"
-                )
+                f"Template file path {deployment_data.template_file_path!r} "
+                "is not relative to the current working directory"
             )
             template_path = (
                 Path(deployment_file).parent / deployment_data.template_file_path
diff --git a/src/cfnlint/runner/parameter_file/runner.py b/src/cfnlint/runner/parameter_file/runner.py
index 51a6b2da54..c4429d48f1 100644
--- a/src/cfnlint/runner/parameter_file/runner.py
+++ b/src/cfnlint/runner/parameter_file/runner.py
@@ -20,7 +20,6 @@
 def _parse_parameter_file(
     filename: str,
 ) -> dict[str, Any] | list[Match]:
-
     data, matches = decode(filename)
 
     if data is None:
diff --git a/src/cfnlint/runner/template/runner.py b/src/cfnlint/runner/template/runner.py
index 09f825a089..73110c8a8c 100644
--- a/src/cfnlint/runner/template/runner.py
+++ b/src/cfnlint/runner/template/runner.py
@@ -74,15 +74,12 @@ def _check_metadata_directives(
 def _run_template_per_config(
     cfn: Template, config: ConfigMixIn, rules: Rules
 ) -> Iterator[Match]:
-
     LOGGER.info("Run scan of template %s", cfn.filename)
     if not set(config.regions).issubset(set(REGIONS)):
         unsupported_regions = list(set(config.regions).difference(set(REGIONS)))
         raise InvalidRegionException(
-            (
-                f"Regions {unsupported_regions!r} are unsupported. "
-                f"Supported regions are {REGIONS!r}"
-            ),
+            f"Regions {unsupported_regions!r} are unsupported. "
+            f"Supported regions are {REGIONS!r}",
             32,
         )
 
@@ -105,7 +102,6 @@ def _run_template_per_config(
 def _run_template(
     filename: str | None, template: Any, config: ConfigMixIn, rules: Rules
 ) -> Iterator[Match]:
-
     if not isinstance(template, dict):
         # pylint: disable=import-outside-toplevel
         from cfnlint.rules.errors import ParseError
diff --git a/src/cfnlint/schema/_ref.py b/src/cfnlint/schema/_ref.py
index 7861c27a1f..8ae27f256c 100644
--- a/src/cfnlint/schema/_ref.py
+++ b/src/cfnlint/schema/_ref.py
@@ -12,7 +12,6 @@
 
 
 class Ref:
-
     def __init__(self, schema: "Schema") -> None:
         primary_ids = schema.schema.get("primaryIdentifier", [])
         if len(primary_ids) > 1:
diff --git a/src/cfnlint/schema/manager.py b/src/cfnlint/schema/manager.py
index 0e0cc26aba..8ae4ce67e7 100644
--- a/src/cfnlint/schema/manager.py
+++ b/src/cfnlint/schema/manager.py
@@ -398,7 +398,6 @@ def _update_provider_schema(self, region: str, force: bool = False) -> None:
             LOGGER.info("Issuing updating schemas for %s: %s", region, e)
 
     def patch_schemas(self) -> None:
-
         self._patch_region_schemas(self._region_primary.name)
         # pylint: disable=not-context-manager
         with multiprocessing.Pool() as pool:
diff --git a/src/cfnlint/template/getatts.py b/src/cfnlint/template/getatts.py
index 0f1bdacb24..ff8a2b3e5c 100644
--- a/src/cfnlint/template/getatts.py
+++ b/src/cfnlint/template/getatts.py
@@ -86,9 +86,7 @@ def json_schema(self, region: str) -> dict:
             attr_enum = []
             for attribute in attributes:
                 attr_enum.append(attribute)
-                schema_strings["enum"].append(
-                    f"{resource_name}.{attribute}"
-                )  # type: ignore
+                schema_strings["enum"].append(f"{resource_name}.{attribute}")  # type: ignore
 
             schema_array["items"][0]["enum"].append(resource_name)  # type: ignore
             schema_array["allOf"].append(  # type: ignore
diff --git a/src/cfnlint/template/template.py b/src/cfnlint/template/template.py
index b8bc95623a..5ef18025ce 100644
--- a/src/cfnlint/template/template.py
+++ b/src/cfnlint/template/template.py
@@ -133,10 +133,8 @@ def build_graph(self) -> None:
             LOGGER.info("DOT representation of the graph written to %s", path)
         except ImportError:
             LOGGER.error(
-                (
-                    "Could not write the graph in DOT format. "
-                    "Please install either `pygraphviz` or `pydot` modules."
-                )
+                "Could not write the graph in DOT format. "
+                "Please install either `pygraphviz` or `pydot` modules."
             )
 
     def has_language_extensions_transform(self) -> bool:
@@ -810,7 +808,7 @@ def check_value(
                                 # Example: Fn::FindInMap becomes
                                 # check_find_in_map
                                 # ruff: noqa: E501
-                                function_name = f'check_{camel_to_snake(dict_name.replace("Fn::", ""))}'
+                                function_name = f"check_{camel_to_snake(dict_name.replace('Fn::', ''))}"
                                 if function_name == "check_ref":
                                     if check_ref:
                                         matches.extend(
diff --git a/src/cfnlint/template/transforms/_language_extensions.py b/src/cfnlint/template/transforms/_language_extensions.py
index 607d939cc7..5a0cfbb03a 100644
--- a/src/cfnlint/template/transforms/_language_extensions.py
+++ b/src/cfnlint/template/transforms/_language_extensions.py
@@ -572,10 +572,8 @@ def values(
                                 yield value
                             else:
                                 raise _ValueError(
-                                    (
-                                        "Fn::ForEach collection value "
-                                        f"must be a {_SCALAR_TYPES!r}"
-                                    ),
+                                    "Fn::ForEach collection value "
+                                    f"must be a {_SCALAR_TYPES!r}",
                                     self._obj,
                                 )
                         return
diff --git a/src/cfnlint/template/transforms/_sam.py b/src/cfnlint/template/transforms/_sam.py
index de4e69842e..9f561e0e7e 100644
--- a/src/cfnlint/template/transforms/_sam.py
+++ b/src/cfnlint/template/transforms/_sam.py
@@ -137,7 +137,6 @@ def _replace_local_codeuri(self):
                 Transform._update_to_s3_uri("DefinitionUri", resource_dict)
 
     def _find_and_replace(self, item, parameters):
-
         k, v = is_function(item)
         if k == "Ref":
             if v in parameters:
@@ -203,8 +202,8 @@ def transform_template(self):
         except InvalidDocumentException as e:
             # pylint: disable=import-outside-toplevel
             from cfnlint.match import Match  # pylint: disable=cyclic-import
-            from cfnlint.rules.errors import (  # pylint: disable=cyclic-import
-                TransformError,
+            from cfnlint.rules.errors import (
+                TransformError,  # pylint: disable=cyclic-import
             )
 
             message = "Error transforming template: {0}"
@@ -219,8 +218,8 @@ def transform_template(self):
         except Exception as e:  # pylint: disable=W0703
             # pylint: disable=import-outside-toplevel
             from cfnlint.match import Match  # pylint: disable=cyclic-import
-            from cfnlint.rules.errors import (  # pylint: disable=cyclic-import
-                TransformError,
+            from cfnlint.rules.errors import (
+                TransformError,  # pylint: disable=cyclic-import
             )
 
             LOGGER.debug("Error transforming template: %s", str(e))


Test patch:
diff --git a/test/integration/__init__.py b/test/integration/__init__.py
index e8434cfb0b..4c60f53136 100644
--- a/test/integration/__init__.py
+++ b/test/integration/__init__.py
@@ -121,10 +121,8 @@ def run_module_integration_scenarios(self, config):
                         exit.assert_called_once_with(scenario.get("exit_code", 0))
                     except AssertionError:
                         raise AssertionError(
-                            (
-                                f"Expected exit code {scenario.get('exit_code', 0)!r} "
-                                f"for {filename}: {output}"
-                            )
+                            f"Expected exit code {scenario.get('exit_code', 0)!r} "
+                            f"for {filename}: {output}"
                         )
 
                     self.assertEqual(
diff --git a/test/integration/jsonschema/test_cfn_lint_rules.py b/test/integration/jsonschema/test_cfn_lint_rules.py
index 66de94293d..3fc9f400b9 100644
--- a/test/integration/jsonschema/test_cfn_lint_rules.py
+++ b/test/integration/jsonschema/test_cfn_lint_rules.py
@@ -41,6 +41,6 @@ def test_cfn_lint_rules_have_validate_function():
     for rule in rules:
         assert hasattr(rule, "validate")
         assert callable(rule.validate)
-        assert all(
-            r in parent_rules for r in rule._parent_rules
-        ), f"{rule._parent_rules!r} not in {parent_rules!r}"
+        assert all(r in parent_rules for r in rule._parent_rules), (
+            f"{rule._parent_rules!r} not in {parent_rules!r}"
+        )
diff --git a/test/integration/jsonschema/test_validator_cfn.py b/test/integration/jsonschema/test_validator_cfn.py
index c577529a8d..7bfe1110d7 100644
--- a/test/integration/jsonschema/test_validator_cfn.py
+++ b/test/integration/jsonschema/test_validator_cfn.py
@@ -189,7 +189,7 @@ def test_unique_items(self):
             schema_patches=schema_patch,
             expected_errs=[
                 ValidationError(
-                    message=("array items are not unique"),
+                    message="array items are not unique",
                     path=deque(["Tags"]),
                     validator="uniqueItems",
                     validator_value=True,
@@ -216,7 +216,7 @@ def test_unique_items(self):
             schema_patches=schema_patch,
             expected_errs=[
                 ValidationError(
-                    message=("array items are not unique"),
+                    message="array items are not unique",
                     path=deque(["Tags"]),
                     validator="uniqueItems",
                     validator_value=True,
@@ -281,7 +281,7 @@ def test_unique_items(self):
             schema_patches=schema_patch,
             expected_errs=[
                 ValidationError(
-                    message=("array items are not unique"),
+                    message="array items are not unique",
                     path=deque(["Tags"]),
                     validator="uniqueItems",
                     validator_value=True,
diff --git a/test/integration/rules/test_rules.py b/test/integration/rules/test_rules.py
index 935ce73f9d..031f72b031 100644
--- a/test/integration/rules/test_rules.py
+++ b/test/integration/rules/test_rules.py
@@ -22,11 +22,11 @@ def test_rule_descriptions():
     for rule in rules:
         if not rule.id:
             continue
-        assert (
-            rule.description not in descriptions
-        ), f"Duplicate description {rule.description!r}"
-        assert (
-            rule.shortdesc not in shortdesc
-        ), f"Duplicate shortdesc {rule.shortdesc!r}"
+        assert rule.description not in descriptions, (
+            f"Duplicate description {rule.description!r}"
+        )
+        assert rule.shortdesc not in shortdesc, (
+            f"Duplicate shortdesc {rule.shortdesc!r}"
+        )
         descriptions.add(rule.description)
         shortdesc.add(rule.shortdesc)
diff --git a/test/integration/test_deployment_files.py b/test/integration/test_deployment_files.py
index 06c439af62..36c4a924b7 100644
--- a/test/integration/test_deployment_files.py
+++ b/test/integration/test_deployment_files.py
@@ -15,7 +15,7 @@
 
 
 @pytest.mark.parametrize(
-    ("name,deployment_files,expected"),
+    "name,deployment_files,expected",
     [
         (
             "Correctly configured deployment file",
@@ -134,7 +134,6 @@ def test_deployment_files(
     deployment_files,
     expected,
 ):
-
     config = ConfigMixIn(
         cli_args=[],
         deployment_files=deployment_files,
diff --git a/test/integration/test_directives.py b/test/integration/test_directives.py
index ba3375362a..c850a901d9 100644
--- a/test/integration/test_directives.py
+++ b/test/integration/test_directives.py
@@ -37,7 +37,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 7, "LineNumber": 17},
                     },
-                    "Message": "Additional properties are not allowed ('BucketName1' was unexpected. Did you mean 'BucketName'?)",
+                    "Message": (
+                        "Additional properties are not allowed ('BucketName1' was"
+                        " unexpected. Did you mean 'BucketName'?)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -46,7 +49,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3002",
                         "ShortDescription": "Resource properties are invalid",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties"
+                        ),
                     },
                 },
                 {
@@ -65,7 +70,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 7, "LineNumber": 28},
                     },
-                    "Message": "Additional properties are not allowed ('BadKey' was unexpected)",
+                    "Message": (
+                        "Additional properties are not allowed ('BadKey' was"
+                        " unexpected)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -74,7 +82,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3002",
                         "ShortDescription": "Resource properties are invalid",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties"
+                        ),
                     },
                 },
                 {
@@ -92,7 +102,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 5, "LineNumber": 32},
                     },
-                    "Message": "Additional properties are not allowed ('BadProperty' was unexpected)",
+                    "Message": (
+                        "Additional properties are not allowed ('BadProperty' was"
+                        " unexpected)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -101,7 +114,7 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3001",
                         "ShortDescription": "Basic CloudFormation Resource Check",
-                        "Source": ("https://github.com/aws-cloudformation/cfn-lint"),
+                        "Source": "https://github.com/aws-cloudformation/cfn-lint",
                     },
                 },
                 {
@@ -120,7 +133,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 7, "LineNumber": 35},
                     },
-                    "Message": "Additional properties are not allowed ('BadKey' was unexpected)",
+                    "Message": (
+                        "Additional properties are not allowed ('BadKey' was"
+                        " unexpected)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -129,7 +145,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3002",
                         "ShortDescription": "Resource properties are invalid",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties"
+                        ),
                     },
                 },
                 {
@@ -158,7 +176,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3030",
                         "ShortDescription": "Check if properties have a valid value",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#enum",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#enum"
+                        ),
                     },
                 },
             ],
diff --git a/test/integration/test_formatters.py b/test/integration/test_formatters.py
index 38a5ebb28d..0127db4a9d 100644
--- a/test/integration/test_formatters.py
+++ b/test/integration/test_formatters.py
@@ -26,18 +26,14 @@ def test_junit(self):
             result = result.decode("utf8")
 
         self.assertIn(
-            (
-                '<testcase name="I1002 Validate approaching the template size limit"'
-                ' url="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html"/>'
-            ),
+            '<testcase name="I1002 Validate approaching the template size limit"'
+            ' url="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html"/>',
             result,
         )
         self.assertIn(
-            (
-                '<testcase name="I1003 Validate if we are approaching the '
-                'max size of a description" '
-                'url="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html"/>'
-            ),
+            '<testcase name="I1003 Validate if we are approaching the '
+            'max size of a description" '
+            'url="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html"/>',
             result,
         )
 
@@ -57,9 +53,7 @@ def test_pretty(self):
             result = result.decode("utf8")
 
         self.assertEqual(
-            (
-                "Cfn-lint scanned 2 templates against 2 rules and found 0 errors, 0"
-                " warnings, and 0 informational violations"
-            ),
+            "Cfn-lint scanned 2 templates against 2 rules and found 0 errors, 0"
+            " warnings, and 0 informational violations",
             result.strip(),
         )
diff --git a/test/integration/test_good_templates.py b/test/integration/test_good_templates.py
index a57592f075..f0dcf0b391 100644
--- a/test/integration/test_good_templates.py
+++ b/test/integration/test_good_templates.py
@@ -40,7 +40,9 @@ class TestQuickStartTemplates(BaseCliTestCase):
             ),
             "results": [
                 {
-                    "Filename": "test/fixtures/templates/bad/transform_serverless_template.yaml",
+                    "Filename": (
+                        "test/fixtures/templates/bad/transform_serverless_template.yaml"
+                    ),
                     "Id": "9e05773a-b0d0-f157-2955-596d9bd54749",
                     "Level": "Error",
                     "Location": {
@@ -48,17 +50,28 @@ class TestQuickStartTemplates(BaseCliTestCase):
                         "Path": None,
                         "Start": {"ColumnNumber": 1, "LineNumber": 1},
                     },
-                    "Message": "Error transforming template: Resource with id [myFunctionMyTimer] is invalid. Missing required property 'Schedule'.",
+                    "Message": (
+                        "Error transforming template: Resource with id"
+                        " [myFunctionMyTimer] is invalid. Missing required property"
+                        " 'Schedule'."
+                    ),
                     "ParentId": None,
                     "Rule": {
-                        "Description": "Errors found when performing transformation on the template",
+                        "Description": (
+                            "Errors found when performing transformation on the"
+                            " template"
+                        ),
                         "Id": "E0001",
-                        "ShortDescription": "Error found when transforming the template",
+                        "ShortDescription": (
+                            "Error found when transforming the template"
+                        ),
                         "Source": "https://github.com/aws-cloudformation/cfn-lint",
                     },
                 },
                 {
-                    "Filename": "test/fixtures/templates/bad/transform_serverless_template.yaml",
+                    "Filename": (
+                        "test/fixtures/templates/bad/transform_serverless_template.yaml"
+                    ),
                     "Id": "fd751fa3-7d1f-e194-7108-eb08352814c8",
                     "Level": "Error",
                     "Location": {
@@ -66,17 +79,27 @@ class TestQuickStartTemplates(BaseCliTestCase):
                         "Path": None,
                         "Start": {"ColumnNumber": 1, "LineNumber": 1},
                     },
-                    "Message": "Error transforming template: Resource with id [ExampleLayer] is invalid. Missing required property 'ContentUri'.",
+                    "Message": (
+                        "Error transforming template: Resource with id [ExampleLayer]"
+                        " is invalid. Missing required property 'ContentUri'."
+                    ),
                     "ParentId": None,
                     "Rule": {
-                        "Description": "Errors found when performing transformation on the template",
+                        "Description": (
+                            "Errors found when performing transformation on the"
+                            " template"
+                        ),
                         "Id": "E0001",
-                        "ShortDescription": "Error found when transforming the template",
+                        "ShortDescription": (
+                            "Error found when transforming the template"
+                        ),
                         "Source": "https://github.com/aws-cloudformation/cfn-lint",
                     },
                 },
                 {
-                    "Filename": "test/fixtures/templates/bad/transform_serverless_template.yaml",
+                    "Filename": (
+                        "test/fixtures/templates/bad/transform_serverless_template.yaml"
+                    ),
                     "Id": "74181426-e865-10eb-96fd-908dfd30a358",
                     "Level": "Error",
                     "Location": {
@@ -84,12 +107,21 @@ class TestQuickStartTemplates(BaseCliTestCase):
                         "Path": None,
                         "Start": {"ColumnNumber": 1, "LineNumber": 1},
                     },
-                    "Message": "Error transforming template: Resource with id [AppName] is invalid. Resource is missing the required [Location] property.",
+                    "Message": (
+                        "Error transforming template: Resource with id [AppName] is"
+                        " invalid. Resource is missing the required [Location]"
+                        " property."
+                    ),
                     "ParentId": None,
                     "Rule": {
-                        "Description": "Errors found when performing transformation on the template",
+                        "Description": (
+                            "Errors found when performing transformation on the"
+                            " template"
+                        ),
                         "Id": "E0001",
-                        "ShortDescription": "Error found when transforming the template",
+                        "ShortDescription": (
+                            "Error found when transforming the template"
+                        ),
                         "Source": "https://github.com/aws-cloudformation/cfn-lint",
                     },
                 },
@@ -107,12 +139,16 @@ class TestQuickStartTemplates(BaseCliTestCase):
             "exit_code": 0,
         },
         {
-            "filename": "test/fixtures/templates/good/resources_cognito_userpool_tag_is_string_map.yaml",
+            "filename": (
+                "test/fixtures/templates/good/resources_cognito_userpool_tag_is_string_map.yaml"
+            ),
             "results": [],
             "exit_code": 0,
         },
         {
-            "filename": "test/fixtures/templates/bad/resources_cognito_userpool_tag_is_list.yaml",
+            "filename": (
+                "test/fixtures/templates/bad/resources_cognito_userpool_tag_is_list.yaml"
+            ),
             "results": [
                 {
                     "Filename": str(
@@ -144,7 +180,9 @@ class TestQuickStartTemplates(BaseCliTestCase):
                         ),
                         "Id": "E3012",
                         "ShortDescription": "Check resource properties values",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#type",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#type"
+                        ),
                     },
                 }
             ],
@@ -180,17 +218,24 @@ class TestQuickStartTemplates(BaseCliTestCase):
                         "Path": ["Resources", "myFunction", "Properties", "Runtime"],
                         "Start": {"ColumnNumber": 3, "LineNumber": 10},
                     },
-                    "Message": "Runtime 'nodejs6.10' was deprecated on '2019-08-12'. Creation was disabled on '2019-08-12' and update on '2019-08-12'. Please consider updating to 'nodejs22.x'",
+                    "Message": (
+                        "Runtime 'nodejs6.10' was deprecated on '2019-08-12'. Creation"
+                        " was disabled on '2019-08-12' and update on '2019-08-12'."
+                        " Please consider updating to 'nodejs22.x'"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
-                            "Check if an EOL Lambda Runtime is specified and you cannot update the function"
+                            "Check if an EOL Lambda Runtime is specified and you cannot"
+                            " update the function"
                         ),
                         "Id": "E2533",
                         "ShortDescription": (
                             "Check if Lambda Function Runtimes are updatable"
                         ),
-                        "Source": "https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html",
+                        "Source": (
+                            "https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html"
+                        ),
                     },
                 }
             ],
diff --git a/test/integration/test_integration_templates.py b/test/integration/test_integration_templates.py
index 8d81cd0037..1ecb7b7c7a 100644
--- a/test/integration/test_integration_templates.py
+++ b/test/integration/test_integration_templates.py
@@ -14,12 +14,10 @@ class TestQuickStartTemplates(BaseCliTestCase):
     scenarios = [
         {
             "filename": (
-                "test/fixtures/templates/integration"
-                "/resources-cloudformation-init.yaml"
+                "test/fixtures/templates/integration/resources-cloudformation-init.yaml"
             ),
             "results_filename": (
-                "test/fixtures/results/integration/"
-                "resources-cloudformation-init.json"
+                "test/fixtures/results/integration/resources-cloudformation-init.json"
             ),
             "exit_code": 0,
         },
@@ -32,34 +30,34 @@ class TestQuickStartTemplates(BaseCliTestCase):
         },
         {
             "filename": "test/fixtures/templates/integration/ref-no-value.yaml",
-            "results_filename": ("test/fixtures/results/integration/ref-no-value.json"),
+            "results_filename": "test/fixtures/results/integration/ref-no-value.json",
             "exit_code": 2,
         },
         {
             "filename": "test/fixtures/templates/integration/metdata.yaml",
-            "results_filename": ("test/fixtures/results/integration/metadata.json"),
+            "results_filename": "test/fixtures/results/integration/metadata.json",
             "exit_code": 4,
         },
         {
-            "filename": ("test/fixtures/templates/integration/availability-zones.yaml"),
+            "filename": "test/fixtures/templates/integration/availability-zones.yaml",
             "results_filename": (
                 "test/fixtures/results/integration/availability-zones.json"
             ),
             "exit_code": 2,
         },
         {
-            "filename": ("test/fixtures/templates/integration/getatt-types.yaml"),
-            "results_filename": ("test/fixtures/results/integration/getatt-types.json"),
+            "filename": "test/fixtures/templates/integration/getatt-types.yaml",
+            "results_filename": "test/fixtures/results/integration/getatt-types.json",
             "exit_code": 10,
         },
         {
-            "filename": ("test/fixtures/templates/integration/ref-types.yaml"),
-            "results_filename": ("test/fixtures/results/integration/ref-types.json"),
+            "filename": "test/fixtures/templates/integration/ref-types.yaml",
+            "results_filename": "test/fixtures/results/integration/ref-types.json",
             "exit_code": 2,
         },
         {
-            "filename": ("test/fixtures/templates/integration/formats.yaml"),
-            "results_filename": ("test/fixtures/results/integration/formats.json"),
+            "filename": "test/fixtures/templates/integration/formats.yaml",
+            "results_filename": "test/fixtures/results/integration/formats.json",
             "exit_code": 2,
         },
         {
@@ -72,7 +70,7 @@ class TestQuickStartTemplates(BaseCliTestCase):
             "exit_code": 2,
         },
         {
-            "filename": ("test/fixtures/templates/integration/aws-ec2-instance.yaml"),
+            "filename": "test/fixtures/templates/integration/aws-ec2-instance.yaml",
             "results_filename": (
                 "test/fixtures/results/integration/aws-ec2-instance.json"
             ),
@@ -88,14 +86,12 @@ class TestQuickStartTemplates(BaseCliTestCase):
             "exit_code": 2,
         },
         {
-            "filename": ("test/fixtures/templates/integration/aws-ec2-subnet.yaml"),
-            "results_filename": (
-                "test/fixtures/results/integration/aws-ec2-subnet.json"
-            ),
+            "filename": "test/fixtures/templates/integration/aws-ec2-subnet.yaml",
+            "results_filename": "test/fixtures/results/integration/aws-ec2-subnet.json",
             "exit_code": 2,
         },
         {
-            "filename": ("test/fixtures/templates/integration/aws-dynamodb-table.yaml"),
+            "filename": "test/fixtures/templates/integration/aws-dynamodb-table.yaml",
             "results_filename": (
                 "test/fixtures/results/integration/aws-dynamodb-table.json"
             ),
diff --git a/test/integration/test_mandatory_checks.py b/test/integration/test_mandatory_checks.py
index fd2facfb5d..2af1a71db8 100644
--- a/test/integration/test_mandatory_checks.py
+++ b/test/integration/test_mandatory_checks.py
@@ -35,7 +35,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 7, "LineNumber": 17},
                     },
-                    "Message": "Additional properties are not allowed ('BucketName1' was unexpected. Did you mean 'BucketName'?)",
+                    "Message": (
+                        "Additional properties are not allowed ('BucketName1' was"
+                        " unexpected. Did you mean 'BucketName'?)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -44,7 +47,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3002",
                         "ShortDescription": "Resource properties are invalid",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties"
+                        ),
                     },
                 },
                 {
@@ -63,7 +68,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 7, "LineNumber": 23},
                     },
-                    "Message": "Additional properties are not allowed ('BadKey' was unexpected)",
+                    "Message": (
+                        "Additional properties are not allowed ('BadKey' was"
+                        " unexpected)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -72,7 +80,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3002",
                         "ShortDescription": "Resource properties are invalid",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties"
+                        ),
                     },
                 },
                 {
@@ -90,7 +100,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 5, "LineNumber": 27},
                     },
-                    "Message": "Additional properties are not allowed ('BadProperty' was unexpected)",
+                    "Message": (
+                        "Additional properties are not allowed ('BadProperty' was"
+                        " unexpected)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -99,7 +112,7 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3001",
                         "ShortDescription": "Basic CloudFormation Resource Check",
-                        "Source": ("https://github.com/aws-cloudformation/cfn-lint"),
+                        "Source": "https://github.com/aws-cloudformation/cfn-lint",
                     },
                 },
                 {
@@ -118,7 +131,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 7, "LineNumber": 30},
                     },
-                    "Message": "Additional properties are not allowed ('BadKey' was unexpected)",
+                    "Message": (
+                        "Additional properties are not allowed ('BadKey' was"
+                        " unexpected)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -127,7 +143,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3002",
                         "ShortDescription": "Resource properties are invalid",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties"
+                        ),
                     },
                 },
                 {
@@ -156,7 +174,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3030",
                         "ShortDescription": "Check if properties have a valid value",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#enum",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#enum"
+                        ),
                     },
                 },
                 {
@@ -175,7 +195,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 7, "LineNumber": 13},
                     },
-                    "Message": "Additional properties are not allowed ('BucketName1' was unexpected. Did you mean 'BucketName'?)",
+                    "Message": (
+                        "Additional properties are not allowed ('BucketName1' was"
+                        " unexpected. Did you mean 'BucketName'?)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -184,7 +207,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3002",
                         "ShortDescription": "Resource properties are invalid",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#properties"
+                        ),
                     },
                 },
                 {
@@ -202,7 +227,10 @@ class TestDirectives(BaseCliTestCase):
                         ],
                         "Start": {"ColumnNumber": 5, "LineNumber": 19},
                     },
-                    "Message": "Additional properties are not allowed ('BadProperty' was unexpected)",
+                    "Message": (
+                        "Additional properties are not allowed ('BadProperty' was"
+                        " unexpected)"
+                    ),
                     "ParentId": None,
                     "Rule": {
                         "Description": (
@@ -211,7 +239,7 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3001",
                         "ShortDescription": "Basic CloudFormation Resource Check",
-                        "Source": ("https://github.com/aws-cloudformation/cfn-lint"),
+                        "Source": "https://github.com/aws-cloudformation/cfn-lint",
                     },
                 },
                 {
@@ -240,7 +268,9 @@ class TestDirectives(BaseCliTestCase):
                         ),
                         "Id": "E3030",
                         "ShortDescription": "Check if properties have a valid value",
-                        "Source": "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#enum",
+                        "Source": (
+                            "https://github.com/aws-cloudformation/cfn-lint/blob/main/docs/cfn-schema-specification.md#enum"
+                        ),
                     },
                 },
             ],
diff --git a/test/integration/test_parameter_files.py b/test/integration/test_parameter_files.py
index b9bea3c3c0..ec43fa72c2 100644
--- a/test/integration/test_parameter_files.py
+++ b/test/integration/test_parameter_files.py
@@ -15,7 +15,7 @@
 
 
 @pytest.mark.parametrize(
-    ("name,parameter_files,templates,expected"),
+    "name,parameter_files,templates,expected",
     [
         (
             "Correctly configured deployment file",
@@ -138,7 +138,6 @@ def test_parameter_files(
     templates,
     expected,
 ):
-
     config = ConfigMixIn(
         cli_args=[],
         parameter_files=parameter_files,
diff --git a/test/integration/test_template_parameters.py b/test/integration/test_template_parameters.py
index 05126780f8..973aa73a73 100644
--- a/test/integration/test_template_parameters.py
+++ b/test/integration/test_template_parameters.py
@@ -15,7 +15,7 @@
 
 
 @pytest.mark.parametrize(
-    ("name,parameters,template,expected"),
+    "name,parameters,template,expected",
     [
         (
             "Correctly configured deployment file",
@@ -177,7 +177,6 @@ def test_parameters(
     template,
     expected,
 ):
-
     config = ConfigMixIn(
         cli_args=[],
         parameters=parameters,
diff --git a/test/unit/module/cfn_json/test_cfn_json.py b/test/unit/module/cfn_json/test_cfn_json.py
index 23296b38cc..6182485073 100644
--- a/test/unit/module/cfn_json/test_cfn_json.py
+++ b/test/unit/module/cfn_json/test_cfn_json.py
@@ -61,9 +61,9 @@ def test_success_parse(self):
             cfn = Template(filename, template, ["us-east-1"])
 
             matches = list(self.rules.run(filename, cfn, self.config))
-            assert (
-                len(matches) == failures
-            ), "Expected {} failures, got {} on {}".format(failures, matches, filename)
+            assert len(matches) == failures, (
+                "Expected {} failures, got {} on {}".format(failures, matches, filename)
+            )
 
     def test_success_escape_character(self):
         """Test Successful JSON Parsing"""
@@ -89,10 +89,10 @@ def test_success_parse_stdin(self):
                 cfn = Template(filename, template, ["us-east-1"])
 
                 matches = list(self.rules.run(filename, cfn, self.config))
-                assert (
-                    len(matches) == failures
-                ), "Expected {} failures, got {} on {}".format(
-                    failures, matches, values.get("filename")
+                assert len(matches) == failures, (
+                    "Expected {} failures, got {} on {}".format(
+                        failures, matches, values.get("filename")
+                    )
                 )
 
     def test_fail_run(self):
diff --git a/test/unit/module/cfn_yaml/test_yaml.py b/test/unit/module/cfn_yaml/test_yaml.py
index 4925732423..0ff2b06046 100644
--- a/test/unit/module/cfn_yaml/test_yaml.py
+++ b/test/unit/module/cfn_yaml/test_yaml.py
@@ -40,10 +40,10 @@ def test_success_parse(self):
             cfn = Template(filename, template, ["us-east-1"])
 
             matches = list(self.rules.run(filename, cfn, ConfigMixIn({})))
-            assert (
-                len(matches) == failures
-            ), "Expected {} failures, got {} on {}".format(
-                failures, len(matches), filename
+            assert len(matches) == failures, (
+                "Expected {} failures, got {} on {}".format(
+                    failures, len(matches), filename
+                )
             )
 
     def test_success_parse_stdin(self):
@@ -60,10 +60,10 @@ def test_success_parse_stdin(self):
 
                 matches = []
                 matches.extend(self.rules.run(filename, cfn, ConfigMixIn({})))
-                assert (
-                    len(matches) == failures
-                ), "Expected {} failures, got {} on {}".format(
-                    failures, len(matches), values.get("filename")
+                assert len(matches) == failures, (
+                    "Expected {} failures, got {} on {}".format(
+                        failures, len(matches), values.get("filename")
+                    )
                 )
 
     def test_map_failure(self):
diff --git a/test/unit/module/conditions/test_rules.py b/test/unit/module/conditions/test_rules.py
index bd0474ef4a..1a1bca2c85 100644
--- a/test/unit/module/conditions/test_rules.py
+++ b/test/unit/module/conditions/test_rules.py
@@ -11,7 +11,6 @@
 
 
 class TestConditionsWithRules(TestCase):
-
     def test_conditions_with_rules(self):
         template = decode_str(
             """
diff --git a/test/unit/module/context/conditions/test_equals_sort.py b/test/unit/module/context/conditions/test_equals_sort.py
index 38eb72a536..838825dac3 100644
--- a/test/unit/module/context/conditions/test_equals_sort.py
+++ b/test/unit/module/context/conditions/test_equals_sort.py
@@ -100,6 +100,6 @@
     ],
 )
 def test_sorted(name, instance, expected):
-    assert expected == sorted(
-        instance, key=_equals_cmp_key
-    ), f"{name} got {sorted(instance, key=_equals_cmp_key)}"
+    assert expected == sorted(instance, key=_equals_cmp_key), (
+        f"{name} got {sorted(instance, key=_equals_cmp_key)}"
+    )
diff --git a/test/unit/module/context/test_parameter.py b/test/unit/module/context/test_parameter.py
index 0e5383c32e..3cab55e219 100644
--- a/test/unit/module/context/test_parameter.py
+++ b/test/unit/module/context/test_parameter.py
@@ -94,9 +94,9 @@ def test_parameter(name, instance, expected_type, expected_ref_value):
     parameter = Parameter(instance)
 
     assert expected_type == parameter.type
-    assert expected_ref_value == list(
-        parameter.ref_value(context)
-    ), f"{name!r} test got {list(parameter.ref_value(context))}"
+    assert expected_ref_value == list(parameter.ref_value(context)), (
+        f"{name!r} test got {list(parameter.ref_value(context))}"
+    )
     assert {} == parameter.ref()
 
 
diff --git a/test/unit/module/context/test_resource.py b/test/unit/module/context/test_resource.py
index 03e75b8a2f..c77c34fddc 100644
--- a/test/unit/module/context/test_resource.py
+++ b/test/unit/module/context/test_resource.py
@@ -27,9 +27,9 @@ def test_resource(name, instance, expected_ref):
     region = "us-east-1"
     resource = Resource(instance)
 
-    assert expected_ref == resource.ref(
-        region
-    ), f"{name!r} test got {resource.ref(region)}"
+    assert expected_ref == resource.ref(region), (
+        f"{name!r} test got {resource.ref(region)}"
+    )
 
 
 @pytest.mark.parametrize(
@@ -119,6 +119,6 @@ def test_nested_stacks(name, instance, filename, decode_results, expected_getatt
 
         resource = Resource(instance, filename)
 
-        assert expected_getatts == resource.get_atts(
-            region
-        ), f"{name!r} test got {resource.get_atts(region)}"
+        assert expected_getatts == resource.get_atts(region), (
+            f"{name!r} test got {resource.get_atts(region)}"
+        )
diff --git a/test/unit/module/context/test_transforms.py b/test/unit/module/context/test_transforms.py
index 451e9c8566..cb3bed2265 100644
--- a/test/unit/module/context/test_transforms.py
+++ b/test/unit/module/context/test_transforms.py
@@ -24,6 +24,6 @@
 def test_transforms(name, instance, expected):
     transforms = Transforms(instance)
 
-    assert (
-        expected == transforms.has_language_extensions_transform()
-    ), f"{name!r} test got {transforms.has_language_extensions_transform()}"
+    assert expected == transforms.has_language_extensions_transform(), (
+        f"{name!r} test got {transforms.has_language_extensions_transform()}"
+    )
diff --git a/test/unit/module/formatters/test_formatters.py b/test/unit/module/formatters/test_formatters.py
index 0d61ff8576..e03e658e2f 100644
--- a/test/unit/module/formatters/test_formatters.py
+++ b/test/unit/module/formatters/test_formatters.py
@@ -134,10 +134,8 @@ def test_quiet_formatter(self):
             # ruff: noqa: E501
             self.assertEqual(
                 a_results[i],
-                (
-                    f"{self.results[i].rule.id}:"
-                    f" {self.results[i].rule.shortdesc} {self.results[i].filename}:{self.results[i].linenumber}"
-                ),
+                f"{self.results[i].rule.id}:"
+                f" {self.results[i].rule.shortdesc} {self.results[i].filename}:{self.results[i].linenumber}",
             )
 
     def test_parseable_formatter(self):
@@ -166,53 +164,41 @@ def test_pretty_formatter(self):
             self.assertEqual(results[0], f"\x1b[4m{self.filename}\x1b[0m")
             self.assertEqual(
                 results[1],
-                (
-                    f"\x1b[0m{self.results[2].linenumber}:{self.results[2].columnnumber}:"
-                    f"               \x1b[0m\x1b[31m{self.results[2].rule.id}    "
-                    f" \x1b[0m{self.results[2].message}"
-                ),
+                f"\x1b[0m{self.results[2].linenumber}:{self.results[2].columnnumber}:"
+                f"               \x1b[0m\x1b[31m{self.results[2].rule.id}    "
+                f" \x1b[0m{self.results[2].message}",
             )
             self.assertEqual(
                 results[2],
-                (
-                    f"\x1b[0m{self.results[1].linenumber}:{self.results[1].columnnumber}:"
-                    f"                \x1b[0m\x1b[33m{self.results[1].rule.id}    "
-                    f" \x1b[0m{self.results[1].message}"
-                ),
+                f"\x1b[0m{self.results[1].linenumber}:{self.results[1].columnnumber}:"
+                f"                \x1b[0m\x1b[33m{self.results[1].rule.id}    "
+                f" \x1b[0m{self.results[1].message}",
             )
             self.assertEqual(
                 results[3],
-                (
-                    f"\x1b[0m{self.results[0].linenumber}:{self.results[0].columnnumber}:"
-                    f"                \x1b[0m\x1b[34m{self.results[0].rule.id}    "
-                    f" \x1b[0m{self.results[0].message}"
-                ),
+                f"\x1b[0m{self.results[0].linenumber}:{self.results[0].columnnumber}:"
+                f"                \x1b[0m\x1b[34m{self.results[0].rule.id}    "
+                f" \x1b[0m{self.results[0].message}",
             )
         else:
             # Check the errors
             self.assertEqual(results[0], self.filename)
             self.assertEqual(
                 results[1],
-                (
-                    f"{self.results[2].linenumber}:{self.results[2].columnnumber}:     "
-                    f"          {self.results[2].rule.id}     {self.results[2].message}"
-                ),
+                f"{self.results[2].linenumber}:{self.results[2].columnnumber}:     "
+                f"          {self.results[2].rule.id}     {self.results[2].message}",
             )
             self.assertEqual(
                 results[2],
-                (
-                    f"{self.results[1].linenumber}:{self.results[1].columnnumber}:     "
-                    f"           {self.results[1].rule.id}    "
-                    f" {self.results[1].message}"
-                ),
+                f"{self.results[1].linenumber}:{self.results[1].columnnumber}:     "
+                f"           {self.results[1].rule.id}    "
+                f" {self.results[1].message}",
             )
             self.assertEqual(
                 results[3],
-                (
-                    f"{self.results[0].linenumber}:{self.results[0].columnnumber}:     "
-                    f"           {self.results[0].rule.id}    "
-                    f" {self.results[0].message}"
-                ),
+                f"{self.results[0].linenumber}:{self.results[0].columnnumber}:     "
+                f"           {self.results[0].rule.id}    "
+                f" {self.results[0].message}",
             )
 
     @patch("sys.stdin.isatty", return_va=True)
diff --git a/test/unit/module/jsonschema/test_format.py b/test/unit/module/jsonschema/test_format.py
index 14c0777a57..e2d8787de7 100644
--- a/test/unit/module/jsonschema/test_format.py
+++ b/test/unit/module/jsonschema/test_format.py
@@ -13,11 +13,9 @@ class TestFormat(unittest.TestCase):
     def test_format_checker(self):
         self.assertEqual(
             str(cfn_format_checker),
-            (
-                "<FormatChecker checkers=['date', 'date-time',"
-                " 'email', 'ipv4', 'ipv4-network', 'ipv6', "
-                "'ipv6-network', 'regex', 'time']>"
-            ),
+            "<FormatChecker checkers=['date', 'date-time',"
+            " 'email', 'ipv4', 'ipv4-network', 'ipv6', "
+            "'ipv6-network', 'regex', 'time']>",
         )
 
         self.assertIsNone(cfn_format_checker.check("aws@amazon.com", "email"))
diff --git a/test/unit/module/jsonschema/test_keywords.py b/test/unit/module/jsonschema/test_keywords.py
index 00fa2dab17..fc1ba333a4 100644
--- a/test/unit/module/jsonschema/test_keywords.py
+++ b/test/unit/module/jsonschema/test_keywords.py
@@ -4,6 +4,7 @@
 """
 
 from collections import deque
+from unittest.mock import Mock
 
 import pytest
 
@@ -134,3 +135,50 @@ def validator():
 def test_anyof(name, instance, schema, validator, expected):
     errs = list(_keywords.anyOf(validator, schema, instance, schema))
     assert errs == expected, f"{name!r} got errors {errs!r}"
+
+
+def test_if_validator_context_evolution():
+    """Test that the if_validator evolves context with allow_exceptions=False"""
+
+    # Create a mock validator with a mock context
+    mock_validator = Mock()
+    mock_context = Mock()
+    mock_validator.context = mock_context
+
+    # Mock the context.evolve method to return a new context
+    mock_evolved_context = Mock()
+    mock_context.evolve.return_value = mock_evolved_context
+
+    # Mock the function_filter.evolve method
+    mock_function_filter = Mock()
+    mock_validator.function_filter = mock_function_filter
+    mock_function_filter.evolve.return_value = Mock()
+
+    # Mock the first validator.evolve call (for function_filter)
+    mock_evolved_validator = Mock()
+    mock_validator.evolve.return_value = mock_evolved_validator
+
+    # Set up the evolved validator's context and methods
+    mock_evolved_validator.context = mock_context
+    mock_evolved_validator.descend.return_value = iter([])
+
+    # Mock the second evolve call (for context) on the evolved validator
+    mock_if_validator = Mock()
+    mock_evolved_validator.evolve.return_value = mock_if_validator
+
+    # Mock the final evolve call (for schema) and is_valid
+    mock_final_validator = Mock()
+    mock_final_validator.is_valid.return_value = True
+    mock_if_validator.evolve.return_value = mock_final_validator
+
+    # Create a simple schema
+    schema = {"if": {"const": "test"}, "then": {"const": "result"}}
+
+    # Call the if_ function
+    list(_keywords.if_(mock_validator, schema, "test", schema))
+
+    # Verify that context.evolve was called with allow_exceptions=False
+    mock_context.evolve.assert_called_once_with(allow_exceptions=False)
+
+    # Verify that the evolved validator's evolve was called with the evolved context
+    mock_evolved_validator.evolve.assert_called_once_with(context=mock_evolved_context)
diff --git a/test/unit/module/jsonschema/test_keywords_cfn.py b/test/unit/module/jsonschema/test_keywords_cfn.py
index b46ce0d762..964648cff5 100644
--- a/test/unit/module/jsonschema/test_keywords_cfn.py
+++ b/test/unit/module/jsonschema/test_keywords_cfn.py
@@ -182,10 +182,8 @@ def resolve(self, ref):
             ["Ref", "Fn::GetAtt"],
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed "
-                        "('Fn::GetAtt' was unexpected)"
-                    ),
+                    "Additional properties are not allowed "
+                    "('Fn::GetAtt' was unexpected)",
                     path=deque(["Fn::GetAtt"]),
                 )
             ],
@@ -234,10 +232,8 @@ def test_additional_properties_with_functions(
             {},
             [
                 ValidationError(
-                    (
-                        "Transform 'AWS::LanguageExtensions' is "
-                        "required but not present in the template"
-                    ),
+                    "Transform 'AWS::LanguageExtensions' is "
+                    "required but not present in the template",
                     path=deque([]),
                 )
             ],
@@ -298,10 +294,8 @@ def test_additional_properties_with_functions(
             {},
             [
                 ValidationError(
-                    (
-                        "'Parameters/MyParam' does not match "
-                        "'^Resources/MyResource/Properties.*$'"
-                    ),
+                    "'Parameters/MyParam' does not match "
+                    "'^Resources/MyResource/Properties.*$'",
                     schema_path=deque(["pattern"]),
                     path=deque([]),
                     validator="pattern",
diff --git a/test/unit/module/jsonschema/test_resolvers_cfn.py b/test/unit/module/jsonschema/test_resolvers_cfn.py
index 1b007a97da..bc89b550c3 100644
--- a/test/unit/module/jsonschema/test_resolvers_cfn.py
+++ b/test/unit/module/jsonschema/test_resolvers_cfn.py
@@ -24,9 +24,9 @@ def _resolve(name, instance, expected_results, **kwargs):
     validator = CfnTemplateValidator().evolve(**kwargs)
     resolutions = list(validator.resolve_value(instance))
 
-    assert len(resolutions) == len(
-        expected_results
-    ), f"{name!r} got {len(resolutions)!r}"
+    assert len(resolutions) == len(expected_results), (
+        f"{name!r} got {len(resolutions)!r}"
+    )
 
     for i, (instance, v, errors) in enumerate(resolutions):
         assert instance == expected_results[i][0], f"{name!r} got {instance!r}"
@@ -34,12 +34,12 @@ def _resolve(name, instance, expected_results, **kwargs):
         if not errors:
             expected_context = expected_results[i][1]
             _, expected_context = list(expected_context.ref_value("AWS::Region"))[0]
-            assert (
-                v.context.path == expected_context.path
-            ), f"{name!r} got {v.context.path!r}"
-            assert (
-                v.context.ref_values == expected_context.ref_values
-            ), f"{name!r} got {v.context.ref_values!r}"
+            assert v.context.path == expected_context.path, (
+                f"{name!r} got {v.context.path!r}"
+            )
+            assert v.context.ref_values == expected_context.ref_values, (
+                f"{name!r} got {v.context.ref_values!r}"
+            )
 
 
 @pytest.mark.parametrize(
@@ -274,11 +274,9 @@ def test_invalid_functions(name, instance, response):
                     None,
                     Context(),
                     ValidationError(
-                        (
-                            "'bar' is not one of ['foo', "
-                            "'transformFirstKey', 'transformSecondKey', "
-                            "'integers', 'accounts', 'environments']"
-                        ),
+                        "'bar' is not one of ['foo', "
+                        "'transformFirstKey', 'transformSecondKey', "
+                        "'integers', 'accounts', 'environments']",
                         path=deque(["Fn::FindInMap", 0]),
                     ),
                 )
@@ -315,7 +313,7 @@ def test_invalid_functions(name, instance, response):
                     None,
                     Context(),
                     ValidationError(
-                        ("'second' is not one of ['first'] for " "mapping 'foo'"),
+                        "'second' is not one of ['first'] for mapping 'foo'",
                         path=deque(["Fn::FindInMap", 1]),
                     ),
                 )
@@ -399,11 +397,9 @@ def test_invalid_functions(name, instance, response):
                     None,
                     Context(),
                     ValidationError(
-                        (
-                            "'bar' is not a second level key "
-                            "when {'Ref': 'AWS::AccountId'} is "
-                            "resolved for mapping 'accounts'"
-                        ),
+                        "'bar' is not a second level key "
+                        "when {'Ref': 'AWS::AccountId'} is "
+                        "resolved for mapping 'accounts'",
                         path=deque(["Fn::FindInMap", 2]),
                     ),
                 )
@@ -417,10 +413,8 @@ def test_invalid_functions(name, instance, response):
                     None,
                     Context(),
                     ValidationError(
-                        (
-                            "{'Ref': 'AWS::AccountId'} is not a "
-                            "first level key for mapping 'foo'"
-                        ),
+                        "{'Ref': 'AWS::AccountId'} is not a "
+                        "first level key for mapping 'foo'",
                         path=deque(["Fn::FindInMap", 1]),
                     ),
                 )
@@ -439,10 +433,8 @@ def test_invalid_functions(name, instance, response):
                     None,
                     Context(),
                     ValidationError(
-                        (
-                            "'third' is not one of ['second'] for "
-                            "mapping 'foo' and key 'first'"
-                        ),
+                        "'third' is not one of ['second'] for "
+                        "mapping 'foo' and key 'first'",
                         path=deque(["Fn::FindInMap", 2]),
                     ),
                 )
@@ -619,7 +611,7 @@ def test_invalid_functions(name, instance, response):
             [],
         ),
         (
-            ("Valid FindInMap with a Sub with no parameters"),
+            "Valid FindInMap with a Sub with no parameters",
             {"Fn::FindInMap": ["environments", "lion", {"Fn::Sub": "dev"}]},
             [
                 (
@@ -636,7 +628,7 @@ def test_invalid_functions(name, instance, response):
             ],
         ),
         (
-            ("Valid FindInMap with sub to a paremter"),
+            "Valid FindInMap with sub to a paremter",
             {"Fn::FindInMap": ["environments", "lion", {"Fn::Sub": "${Environment}"}]},
             [
                 (
@@ -678,7 +670,7 @@ def test_invalid_functions(name, instance, response):
             ],
         ),
         (
-            ("Valid FindInMap with sub list value to a paramter"),
+            "Valid FindInMap with sub list value to a paramter",
             {
                 "Fn::FindInMap": [
                     "environments",
@@ -726,7 +718,7 @@ def test_invalid_functions(name, instance, response):
             ],
         ),
         (
-            ("Valid FindInMap with an invalid sub"),
+            "Valid FindInMap with an invalid sub",
             {
                 "Fn::FindInMap": [
                     "environments",
@@ -834,7 +826,7 @@ def test_valid_functions(name, instance, response):
                     None,
                     Context(),
                     ValidationError(
-                        ("{'Ref': 'MyParameter'} is not one of []"),
+                        "{'Ref': 'MyParameter'} is not one of []",
                         path=deque(["Fn::FindInMap", 0]),
                     ),
                 )
diff --git a/test/unit/module/jsonschema/test_validator.py b/test/unit/module/jsonschema/test_validator.py
index 414dd103b6..e53638917d 100644
--- a/test/unit/module/jsonschema/test_validator.py
+++ b/test/unit/module/jsonschema/test_validator.py
@@ -294,10 +294,8 @@ def test_validator(name, schema, instance, expected, validator):
             {"foooooa": 2},
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed ('foooooa' "
-                        "was unexpected. Did you mean 'foooooo'?)"
-                    ),
+                    "Additional properties are not allowed ('foooooa' "
+                    "was unexpected. Did you mean 'foooooo'?)",
                 )
             ],
         ),
@@ -686,10 +684,8 @@ def test_validator(name, schema, instance, expected, validator):
             ["foo", 2],
             [
                 ValidationError(
-                    (
-                        "Too few items match the given schema "
-                        "(expected at least 2 but only 1 matched)"
-                    ),
+                    "Too few items match the given schema "
+                    "(expected at least 2 but only 1 matched)",
                     validator="minContains",
                     validator_value=2,
                 )
@@ -1090,7 +1086,7 @@ def test_validator(name, schema, instance, expected, validator):
             ],
             [
                 ValidationError(
-                    "array items are not unique " "for keys ['Name']",
+                    "array items are not unique for keys ['Name']",
                 )
             ],
         ),
diff --git a/test/unit/module/jsonschema/test_validator_exceptions.py b/test/unit/module/jsonschema/test_validator_exceptions.py
index a1dc08b1a6..290fd2d6e8 100644
--- a/test/unit/module/jsonschema/test_validator_exceptions.py
+++ b/test/unit/module/jsonschema/test_validator_exceptions.py
@@ -28,7 +28,6 @@ def validator():
 
 
 def test_validator_raises_exception(validator):
-
     errs = list(validator.iter_errors(""))
 
     assert errs == [
diff --git a/test/unit/module/maintenance/test_update_iam_policies.py b/test/unit/module/maintenance/test_update_iam_policies.py
index 897a81f2e5..a60fc6e4e1 100644
--- a/test/unit/module/maintenance/test_update_iam_policies.py
+++ b/test/unit/module/maintenance/test_update_iam_policies.py
@@ -25,7 +25,9 @@ def test_update_iam_policies(self, mock_json_dump, mock_content):
         services = [
             {
                 "service": "foo",
-                "url": "https://servicereference.us-east-1.amazonaws.com/v1/foo/foo.json",
+                "url": (
+                    "https://servicereference.us-east-1.amazonaws.com/v1/foo/foo.json"
+                ),
             }
         ]
 
diff --git a/test/unit/module/rule/test_rule.py b/test/unit/module/rule/test_rule.py
index 2e9f326f79..bf41967c4e 100644
--- a/test/unit/module/rule/test_rule.py
+++ b/test/unit/module/rule/test_rule.py
@@ -100,6 +100,75 @@ def get_config(self):
         self.assertListEqual(config.get("testListString"), ["foo"])
         self.assertListEqual(config.get("testListInteger"), [1])
 
+    def test_config_with_single_value_for_list(self):
+        """Test Configuration with single value for
+        list type (ensure_list functionality)"""
+
+        class TestRule(CloudFormationLintRule):
+            """Def Rule"""
+
+            id = "E1000"
+            shortdesc = "Test Rule"
+            description = "Test Rule"
+            source_url = "https://github.com/aws-cloudformation/cfn-lint/"
+            tags = ["resources"]
+
+            def __init__(self):
+                """Init"""
+                super(TestRule, self).__init__()
+                self.config_definition = {
+                    "testListBoolean": {
+                        "type": "list",
+                        "itemtype": "boolean",
+                        "default": [False],
+                    },
+                    "testListString": {
+                        "type": "list",
+                        "itemtype": "string",
+                        "default": ["bar"],
+                    },
+                    "testListInteger": {
+                        "type": "list",
+                        "itemtype": "integer",
+                        "default": [0],
+                    },
+                }
+                self.configure()
+
+            def get_config(self):
+                """Get the Config"""
+                return self.config
+
+        rule = TestRule()
+
+        # Test with single values that should be converted to lists
+        rule.configure(
+            {
+                "testListBoolean": "true",  # Single string value
+                "testListString": "foo",  # Single string value
+                "testListInteger": 5,  # Single integer value
+            }
+        )
+
+        config = rule.get_config()
+        self.assertListEqual(config.get("testListBoolean"), [True])
+        self.assertListEqual(config.get("testListString"), ["foo"])
+        self.assertListEqual(config.get("testListInteger"), [5])
+
+        # Test with already list values (should work as before)
+        rule.configure(
+            {
+                "testListBoolean": ["false", "true"],
+                "testListString": ["foo", "bar"],
+                "testListInteger": [1, 2, 3],
+            }
+        )
+
+        config = rule.get_config()
+        self.assertListEqual(config.get("testListBoolean"), [False, True])
+        self.assertListEqual(config.get("testListString"), ["foo", "bar"])
+        self.assertListEqual(config.get("testListInteger"), [1, 2, 3])
+
     def test_experimental(self):
         """Test Configuration"""
 
diff --git a/test/unit/module/runner/deployment_file/deployment_types/test_git_sync.py b/test/unit/module/runner/deployment_file/deployment_types/test_git_sync.py
index f74c2c2bbc..d69c1d06e7 100644
--- a/test/unit/module/runner/deployment_file/deployment_types/test_git_sync.py
+++ b/test/unit/module/runner/deployment_file/deployment_types/test_git_sync.py
@@ -121,7 +121,6 @@
     ],
 )
 def test_git_sync(name, instance, expected):
-
     results = create_deployment_from_git_sync(instance)
 
     assert results == expected, f"{name}: {results} != {expected}"
diff --git a/test/unit/module/runner/deployment_file/test_runner.py b/test/unit/module/runner/deployment_file/test_runner.py
index c37ed33e89..f81e3e33c1 100644
--- a/test/unit/module/runner/deployment_file/test_runner.py
+++ b/test/unit/module/runner/deployment_file/test_runner.py
@@ -22,7 +22,7 @@ def mock_glob(value, recursive):
 
 
 @pytest.mark.parametrize(
-    ("name,deployment_files,expected"),
+    "name,deployment_files,expected",
     [
         (
             "A standard git sync file",
@@ -195,7 +195,7 @@ def mock_glob(value, recursive):
                             columnnumberend=1,
                             filename=_filename_dev,
                             message=(
-                                f"Deployment file {_filename_dev!r} " "is not supported"
+                                f"Deployment file {_filename_dev!r} is not supported"
                             ),
                             rule=Configuration(),
                         )
@@ -245,11 +245,9 @@ def test_runner(
     deployment_files,
     expected,
 ):
-
     decode_results = [v for _, v in deployment_files.items()]
     deployment_files = [k for k, _ in deployment_files.items()]
     with patch("glob.glob", MagicMock(side_effect=mock_glob)):
-
         with patch(
             "cfnlint.config.ConfigMixIn.deployment_files", new_callable=PropertyMock
         ) as mock_deployment_files:
diff --git a/test/unit/module/runner/parameter_file/test_runner.py b/test/unit/module/runner/parameter_file/test_runner.py
index aac16140f7..549efc6247 100644
--- a/test/unit/module/runner/parameter_file/test_runner.py
+++ b/test/unit/module/runner/parameter_file/test_runner.py
@@ -22,7 +22,7 @@ def mock_glob(value, recursive):
 
 
 @pytest.mark.parametrize(
-    ("name,parameter_files,expected"),
+    "name,parameter_files,expected",
     [
         (
             "A standard parameter file",
@@ -105,8 +105,7 @@ def mock_glob(value, recursive):
                             columnnumberend=1,
                             filename=_filename_dev,
                             message=(
-                                "Parameter file 'parameters-dev.json' "
-                                "is not supported"
+                                "Parameter file 'parameters-dev.json' is not supported"
                             ),
                             rule=Configuration(),
                         )
@@ -124,8 +123,7 @@ def mock_glob(value, recursive):
                             columnnumberend=1,
                             filename=_filename_dev,
                             message=(
-                                "Parameter file 'parameters-dev.json' "
-                                "is not supported"
+                                "Parameter file 'parameters-dev.json' is not supported"
                             ),
                             rule=Configuration(),
                         ),
@@ -157,8 +155,7 @@ def mock_glob(value, recursive):
                             columnnumberend=1,
                             filename=_filename_dev,
                             message=(
-                                "Parameter file 'parameters-dev.json' "
-                                "is not supported"
+                                "Parameter file 'parameters-dev.json' is not supported"
                             ),
                             rule=Configuration(),
                         ),
@@ -173,11 +170,9 @@ def test_runner(
     parameter_files,
     expected,
 ):
-
     decode_results = [v for _, v in parameter_files.items()]
     parameter_files = [k for k, _ in parameter_files.items()]
     with patch("glob.glob", MagicMock(side_effect=mock_glob)):
-
         with patch(
             "cfnlint.config.ConfigMixIn.parameter_files", new_callable=PropertyMock
         ) as mock_parameter_files:
diff --git a/test/unit/module/runner/template/test_run_template_by_data.py b/test/unit/module/runner/template/test_run_template_by_data.py
index d0bdf69242..46838a0fcb 100644
--- a/test/unit/module/runner/template/test_run_template_by_data.py
+++ b/test/unit/module/runner/template/test_run_template_by_data.py
@@ -65,7 +65,6 @@ def test_runner(
     runner_results,
     expected_parameters,
 ):
-
     with patch(
         "cfnlint.rules._rules.RulesCollection.run", side_effect=runner_results
     ) as mock_run:
diff --git a/test/unit/module/runner/test_cli.py b/test/unit/module/runner/test_cli.py
index 4ca2ce57f9..96b5670fff 100644
--- a/test/unit/module/runner/test_cli.py
+++ b/test/unit/module/runner/test_cli.py
@@ -172,7 +172,6 @@ def test_bad_regions(self):
 
     @patch("argparse.ArgumentParser.print_help")
     def test_templates_with_deployment_files(self, mock_print_help):
-
         config = ConfigMixIn(
             [
                 "--template",
@@ -193,7 +192,6 @@ def test_templates_with_deployment_files(self, mock_print_help):
 
     @patch("argparse.ArgumentParser.print_help")
     def test_templates_with_parameters_and_parameter_files(self, mock_print_help):
-
         config = ConfigMixIn(
             [
                 "--template",
@@ -215,7 +213,6 @@ def test_templates_with_parameters_and_parameter_files(self, mock_print_help):
 
     @patch("argparse.ArgumentParser.print_help")
     def test_templates_with_deployment_files_and_parameters(self, mock_print_help):
-
         config = ConfigMixIn(
             [],
             parameters=[
@@ -234,7 +231,6 @@ def test_templates_with_deployment_files_and_parameters(self, mock_print_help):
 
     @patch("argparse.ArgumentParser.print_help")
     def test_templates_with_parameters_and_multiple_templates(self, mock_print_help):
-
         config = ConfigMixIn(
             [
                 "--template",
diff --git a/test/unit/module/runner/test_exit_code.py b/test/unit/module/runner/test_exit_code.py
index 84f53d3044..82d09ec67e 100644
--- a/test/unit/module/runner/test_exit_code.py
+++ b/test/unit/module/runner/test_exit_code.py
@@ -67,8 +67,6 @@ def test_exit_code_zero(self):
                 self.assertEqual(
                     e.exception.code,
                     exit_code,
-                    (
-                        f"{match_names!r} matches with {level!r} "
-                        f"level should yield {exit_code!r}"
-                    ),
+                    f"{match_names!r} matches with {level!r} "
+                    f"level should yield {exit_code!r}",
                 )
diff --git a/test/unit/module/runner/test_run.py b/test/unit/module/runner/test_run.py
index 06d7734e1b..3c71763374 100644
--- a/test/unit/module/runner/test_run.py
+++ b/test/unit/module/runner/test_run.py
@@ -47,7 +47,6 @@
     ],
 )
 def test_run(name, config, expected_count):
-
     runner = Runner(config)
 
     errs = list(runner.run())
diff --git a/test/unit/module/runner/test_runner.py b/test/unit/module/runner/test_runner.py
index 9fe30c3317..5f84d658cb 100644
--- a/test/unit/module/runner/test_runner.py
+++ b/test/unit/module/runner/test_runner.py
@@ -104,8 +104,8 @@ def test_no_templates():
         with patch("sys.stdout", new=StringIO()) as out:
             exit.assert_not_called()
             Runner(config)
-            assert out.getvalue().strip() == (
-                "E0003 does-not-exist.yaml could not "
+            assert (
+                out.getvalue().strip() == "E0003 does-not-exist.yaml could not "
                 "be processed by glob.glob\nNone:1:1"
             )
             exit.assert_called_once_with(2)
diff --git a/test/unit/module/schema/resolver/test_resolve_from_url.py b/test/unit/module/schema/resolver/test_resolve_from_url.py
index ccc4412b7c..c73849b573 100644
--- a/test/unit/module/schema/resolver/test_resolve_from_url.py
+++ b/test/unit/module/schema/resolver/test_resolve_from_url.py
@@ -65,7 +65,6 @@ def resource_schema():
 
 
 def test_schema(resource_schema):
-
     schema = Schema(schema=resource_schema)
 
     assert schema.resolver.resolve_from_url("#/") == resource_schema
diff --git a/test/unit/module/schema/test_manager.py b/test/unit/module/schema/test_manager.py
index 1ebd9dde28..35490ad828 100644
--- a/test/unit/module/schema/test_manager.py
+++ b/test/unit/module/schema/test_manager.py
@@ -279,7 +279,6 @@ def test_getting_us_east_1_schema_in_iso(self):
         self.assertTrue(schema_iso.is_cached)
 
     def test_type_normalization(self):
-
         rt = "MyCompany::MODULE"
         schema = self.manager.get_resource_schema("us-east-1", rt)
 
@@ -319,10 +318,8 @@ def test_patch_failure(self, mock_exit, mock_print):
 
         # Verify that print was called with the error message
         mock_print.assert_called_with(
-            (
-                f"Error applying patch {self.schema_patch} for "
-                f"{resource_type}: Invalid patch operation"
-            )
+            f"Error applying patch {self.schema_patch} for "
+            f"{resource_type}: Invalid patch operation"
         )
 
         # Verify that sys.exit was called with exit code 1
diff --git a/test/unit/module/schema/test_other_schema_manager.py b/test/unit/module/schema/test_other_schema_manager.py
index 6216471535..b211a24204 100644
--- a/test/unit/module/schema/test_other_schema_manager.py
+++ b/test/unit/module/schema/test_other_schema_manager.py
@@ -132,10 +132,8 @@ def test_patch_failure(
 
         # Verify that print was called with the error message
         mock_print.assert_called_with(
-            (
-                f"Error applying patch {self.schema_patch} for "
-                f"{schema_path}: Invalid patch operation"
-            )
+            f"Error applying patch {self.schema_patch} for "
+            f"{schema_path}: Invalid patch operation"
         )
 
         # Verify that sys.exit was called with exit code 1
diff --git a/test/unit/module/schema/test_ref.py b/test/unit/module/schema/test_ref.py
index 3c47a164e3..7cd1208db8 100644
--- a/test/unit/module/schema/test_ref.py
+++ b/test/unit/module/schema/test_ref.py
@@ -45,7 +45,6 @@
     ],
 )
 def test_schema(name, resource_schema, expected):
-
     schema = Schema(resource_schema)
 
     assert schema.ref == expected, f"{name!r} test got {schema.ref!r}"
diff --git a/test/unit/module/schema/test_schema.py b/test/unit/module/schema/test_schema.py
index 10a10c8baa..5099f1c329 100644
--- a/test/unit/module/schema/test_schema.py
+++ b/test/unit/module/schema/test_schema.py
@@ -57,7 +57,6 @@ def resource_schema():
 
 
 def test_schema(resource_schema):
-
     schema = Schema(schema=resource_schema)
     assert list(schema.get_atts.keys()) == ["Arn", "Id", "List"]
     assert schema.get_atts["Arn"] == "/properties/Arn"
@@ -236,7 +235,9 @@ def resource_servicecatalog_schema():
                 "type": "object",
             },
         },
-        "documentationUrl": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-cloudformationprovisionedproduct.html",
+        "documentationUrl": (
+            "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-cloudformationprovisionedproduct.html"
+        ),
         "handlers": {
             "create": {"permissions": ["*"], "timeoutInMinutes": 720},
             "delete": {"permissions": ["*"]},
@@ -297,13 +298,14 @@ def resource_servicecatalog_schema():
             "/properties/Outputs",
             "/properties/ProvisionedProductId",
         ],
-        "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
+        "sourceUrl": (
+            "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git"
+        ),
         "typeName": "AWS::ServiceCatalog::CloudFormationProvisionedProduct",
     }
 
 
 def test_servicecatalog_cloudformation_schema(resource_servicecatalog_schema):
-
     schema = Schema(schema=resource_servicecatalog_schema)
     assert list(schema.get_atts.keys()) == [
         "RecordId",
diff --git a/test/unit/module/template/test_template.py b/test/unit/module/template/test_template.py
index 04beff1c29..2dc748ee7b 100644
--- a/test/unit/module/template/test_template.py
+++ b/test/unit/module/template/test_template.py
@@ -59,17 +59,15 @@ def test_build_graph(self):
 MyEC2Instance -> RootInstanceProfile [key=0, source_paths="[\\"Properties\\", \\"IamInstanceProfile\\"]", label=Ref, color=black];
 ElasticLoadBalancer -> MyEC2Instance [key=0, source_paths="[\\"Properties\\", \\"Instances\\", 0]", label=Ref, color=black];
 }
-""".split(
-            "\n"
-        )
+""".split("\n")
 
         assert os.path.exists(dot)
         with open(dot, "r") as file:
             file_contents = file.read().split("\n")
             # doing set equality instead of string equality because python 2.7 and 3.8 produce the same graph but with different edge order
-            assert len(file_contents) == len(
-                expected_content
-            ), f"Length {len(file_contents)} != {len(expected_content)}"
+            assert len(file_contents) == len(expected_content), (
+                f"Length {len(file_contents)} != {len(expected_content)}"
+            )
             assert sorted(file_contents) == sorted(expected_content)
 
         os.remove(dot)
@@ -78,27 +76,28 @@ def test_get_resources_success(self):
         """Test Success on Get Resources"""
         valid_resource_count = 13
         resources = self.template.get_resources()
-        assert (
-            len(resources) == valid_resource_count
-        ), "Expected {} resources, got {}".format(valid_resource_count, len(resources))
+        assert len(resources) == valid_resource_count, (
+            "Expected {} resources, got {}".format(valid_resource_count, len(resources))
+        )
 
     def test_get_modules_success(self):
         """Test Success on Get Modules"""
         expected_modules_count = 1
         actual_modules = self.template.get_modules()
-        assert (
-            len(actual_modules) == expected_modules_count
-        ), "Expected {} modules, got {}".format(
-            expected_modules_count, len(actual_modules)
+        assert len(actual_modules) == expected_modules_count, (
+            "Expected {} modules, got {}".format(
+                expected_modules_count, len(actual_modules)
+            )
         )
 
     def test_get_resource_children(self):
         """Test Success on Get Resources"""
         resources = list(self.template.get_resource_children("RootRole"))
-        self.assertListEqual(
-            resources, ["RolePolicies", "RootInstanceProfile"]
-        ), "Expected {} resources, got {}".format(
-            ["RolePolicies", "RootInstanceProfile"], resources
+        (
+            self.assertListEqual(resources, ["RolePolicies", "RootInstanceProfile"]),
+            "Expected {} resources, got {}".format(
+                ["RolePolicies", "RootInstanceProfile"], resources
+            ),
         )
 
         resources = list(
@@ -106,13 +105,15 @@ def test_get_resource_children(self):
                 "RootRole", ["AWS::IAM::InstanceProfile"]
             )
         )
-        self.assertListEqual(
-            resources, ["RootInstanceProfile"]
-        ), "Expected {} resources, got {}".format(["RootInstanceProfile"], resources)
+        (
+            self.assertListEqual(resources, ["RootInstanceProfile"]),
+            "Expected {} resources, got {}".format(["RootInstanceProfile"], resources),
+        )
 
         resources = list(self.template.get_resource_children("ElasticIP", []))
-        self.assertListEqual(resources, []), "Expected {} resources, got {}".format(
-            [], resources
+        (
+            self.assertListEqual(resources, []),
+            "Expected {} resources, got {}".format([], resources),
         )
 
     def test_get_resources_bad(self):
diff --git a/test/unit/module/template/test_template_get_cfn_path.py b/test/unit/module/template/test_template_get_cfn_path.py
index acea33e03f..b181f90661 100644
--- a/test/unit/module/template/test_template_get_cfn_path.py
+++ b/test/unit/module/template/test_template_get_cfn_path.py
@@ -10,7 +10,6 @@
 
 @pytest.fixture
 def cfn() -> Template:
-
     return Template(
         None,
         {
@@ -106,21 +105,20 @@ def cfn() -> Template:
     ],
 )
 def test_paths(name, path, starting_conditions, expected, cfn):
-
     context = cfn.context.evolve(
         conditions=cfn.context.conditions.evolve(starting_conditions)
     )
 
     results = list(cfn.get_cfn_path(path, context))
 
-    assert len(results) == len(
-        expected
-    ), f"{name!r} test failed. Got results {results!r}"
+    assert len(results) == len(expected), (
+        f"{name!r} test failed. Got results {results!r}"
+    )
 
     for i, value in enumerate(results):
-        assert (
-            value[0] == expected[i][0]
-        ), f"{name!r} test failed for {i}. Got value {value[0]!r}"
+        assert value[0] == expected[i][0], (
+            f"{name!r} test failed for {i}. Got value {value[0]!r}"
+        )
         assert value[1].conditions.status == expected[i][1], (
             f"{name!r} test failed for {i}. Got "
             f"conditions {value[1].conditions.status[0]!r}"
diff --git a/test/unit/module/template/transforms/test_language_extensions.py b/test/unit/module/template/transforms/test_language_extensions.py
index 20190b8bcd..25fed0e80e 100644
--- a/test/unit/module/template/transforms/test_language_extensions.py
+++ b/test/unit/module/template/transforms/test_language_extensions.py
@@ -406,7 +406,6 @@ def test_two_mappings(self):
             fe.value(self.cfn)
 
     def test_account_id(self):
-
         cfnlint.template.transforms._language_extensions._ACCOUNT_ID = None
 
         with mock.patch(
@@ -1038,7 +1037,6 @@ def test_transform(self):
 
 class TestTransformValueEmptyList(TestCase):
     def setUp(self) -> None:
-
         cfnlint.template.transforms._language_extensions._ACCOUNT_ID = None
 
         self.template_obj = convert_dict(
diff --git a/test/unit/module/test_rules_collections.py b/test/unit/module/test_rules_collections.py
index edde4715a7..5a54bc3f6f 100644
--- a/test/unit/module/test_rules_collections.py
+++ b/test/unit/module/test_rules_collections.py
@@ -72,9 +72,9 @@ def test_fail_run(self):
         expected_err_count = 38
         matches = []
         matches.extend(self.rules.run(filename, cfn))
-        assert (
-            len(matches) == expected_err_count
-        ), "Expected {} failures, got {}".format(expected_err_count, len(matches))
+        assert len(matches) == expected_err_count, (
+            "Expected {} failures, got {}".format(expected_err_count, len(matches))
+        )
 
     def test_success_filtering_of_rules_default(self):
         """Test extend function"""
@@ -322,8 +322,7 @@ def test_rule_failure(self):
                     filename="-",
                     rule=RuleError(),
                     message=(
-                        "Unknown exception while processing rule "
-                        "EYYYY: 'Bad template'"
+                        "Unknown exception while processing rule EYYYY: 'Bad template'"
                     ),
                 )
             ],
diff --git a/test/unit/rules/functions/test_basefn.py b/test/unit/rules/functions/test_basefn.py
index bcd41375a1..987611c1d0 100644
--- a/test/unit/rules/functions/test_basefn.py
+++ b/test/unit/rules/functions/test_basefn.py
@@ -71,8 +71,7 @@ def template():
             [
                 ValidationError(
                     message=(
-                        "{'Fn::Sub': 'Bar'} is not one of "
-                        "['Foo'] when '' is resolved"
+                        "{'Fn::Sub': 'Bar'} is not one of ['Foo'] when '' is resolved"
                     ),
                     path=deque(["Fn::Sub"]),
                     validator="",
diff --git a/test/unit/rules/functions/test_dynamic_reference_secrets_manager_arn.py b/test/unit/rules/functions/test_dynamic_reference_secrets_manager_arn.py
index b7e1a7536f..7a6f94ad01 100644
--- a/test/unit/rules/functions/test_dynamic_reference_secrets_manager_arn.py
+++ b/test/unit/rules/functions/test_dynamic_reference_secrets_manager_arn.py
@@ -64,11 +64,9 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:secretsmanager:secret}}'"
-                        " to secrets manager when the field 'SecretArn' expects "
-                        "the ARN to the secret and not the secret"
-                    ),
+                    "Dynamic reference '{{resolve:secretsmanager:secret}}'"
+                    " to secrets manager when the field 'SecretArn' expects "
+                    "the ARN to the secret and not the secret",
                     rule=DynamicReferenceSecretsManagerArn(),
                 )
             ],
@@ -83,12 +81,10 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Dynamic reference "
-                        "'\\\\\"{{resolve:secretsmanager:${MyParameter}}}\\\\\"'"
-                        " to secrets manager when the field 'SecretArn' "
-                        "expects the ARN to the secret and not the secret"
-                    ),
+                    "Dynamic reference "
+                    "'\\\\\"{{resolve:secretsmanager:${MyParameter}}}\\\\\"'"
+                    " to secrets manager when the field 'SecretArn' "
+                    "expects the ARN to the secret and not the secret",
                     rule=DynamicReferenceSecretsManagerArn(),
                 )
             ],
diff --git a/test/unit/rules/functions/test_dynamic_reference_secrets_manager_path.py b/test/unit/rules/functions/test_dynamic_reference_secrets_manager_path.py
index 1186a2f6fc..cf506238e5 100644
--- a/test/unit/rules/functions/test_dynamic_reference_secrets_manager_path.py
+++ b/test/unit/rules/functions/test_dynamic_reference_secrets_manager_path.py
@@ -54,10 +54,8 @@ def context(cfn):
             ["Parameters", "MyParameter"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:secretsmanager:Parameter}}' "
-                        "to secrets manager can only be used in resource properties"
-                    ),
+                    "Dynamic reference '{{resolve:secretsmanager:Parameter}}' "
+                    "to secrets manager can only be used in resource properties",
                     rule=DynamicReferenceSecretsManagerPath(),
                 )
             ],
@@ -68,10 +66,8 @@ def context(cfn):
             ["Outputs", "MyOutput", "Value"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:secretsmanager:Parameter}}' "
-                        "to secrets manager can only be used in resource properties"
-                    ),
+                    "Dynamic reference '{{resolve:secretsmanager:Parameter}}' "
+                    "to secrets manager can only be used in resource properties",
                     rule=DynamicReferenceSecretsManagerPath(),
                 )
             ],
diff --git a/test/unit/rules/functions/test_dynamic_reference_secure_string.py b/test/unit/rules/functions/test_dynamic_reference_secure_string.py
index 99c7392d61..4a766d70a5 100644
--- a/test/unit/rules/functions/test_dynamic_reference_secure_string.py
+++ b/test/unit/rules/functions/test_dynamic_reference_secure_string.py
@@ -52,10 +52,8 @@ def template():
             {"cfn_path": ["Outputs", "*", "Value"]},
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm-secure:Parameter}}' "
-                        "to SSM secure strings can only be used in resource properties"
-                    ),
+                    "Dynamic reference '{{resolve:ssm-secure:Parameter}}' "
+                    "to SSM secure strings can only be used in resource properties",
                     rule=DynamicReferenceSecureString(),
                 )
             ],
@@ -64,6 +62,5 @@ def template():
     indirect=["path"],
 )
 def test_validate(name, instance, path, expected, rule, validator):
-
     errs = list(rule.validate(validator, {"type": "string"}, instance, {}))
     assert errs == expected, f"Test {name!r} got {errs!r}"
diff --git a/test/unit/rules/functions/test_dynamic_reference_ssm_path.py b/test/unit/rules/functions/test_dynamic_reference_ssm_path.py
index 3f9396373e..14776f8caa 100644
--- a/test/unit/rules/functions/test_dynamic_reference_ssm_path.py
+++ b/test/unit/rules/functions/test_dynamic_reference_ssm_path.py
@@ -58,10 +58,8 @@ def context(cfn):
             ["Outputs", "MyOutput", "Export", "Name"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
@@ -72,10 +70,8 @@ def context(cfn):
             ["Outputs"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
@@ -86,10 +82,8 @@ def context(cfn):
             ["Parameters", "MyParameter", "Type"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
@@ -100,10 +94,8 @@ def context(cfn):
             ["Parameters", "MyParameter"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
@@ -114,10 +106,8 @@ def context(cfn):
             ["Resources", "MyResource"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
@@ -128,10 +118,8 @@ def context(cfn):
             ["Resources", "MyResource", "Type"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
@@ -142,10 +130,8 @@ def context(cfn):
             ["Metadata"],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
@@ -156,10 +142,8 @@ def context(cfn):
             [],
             [
                 ValidationError(
-                    (
-                        "Dynamic reference '{{resolve:ssm:Parameter}}' "
-                        "to SSM parameters are not allowed here"
-                    ),
+                    "Dynamic reference '{{resolve:ssm:Parameter}}' "
+                    "to SSM parameters are not allowed here",
                     rule=DynamicReferenceSsmPath(),
                 )
             ],
diff --git a/test/unit/rules/functions/test_getatt.py b/test/unit/rules/functions/test_getatt.py
index 5daf9a6048..eaacfa1681 100644
--- a/test/unit/rules/functions/test_getatt.py
+++ b/test/unit/rules/functions/test_getatt.py
@@ -8,8 +8,8 @@
 import pytest
 
 from cfnlint.jsonschema import ValidationError
-from cfnlint.rules import CfnLintKeyword
 from cfnlint.rules.functions.GetAtt import GetAtt
+from cfnlint.rules.jsonschema.CfnLintKeyword import CfnLintKeyword
 
 
 @pytest.fixture(scope="module")
@@ -74,14 +74,12 @@ def validate(self, validator, s, instance, schema):
             {},
             [
                 ValidationError(
-                    (
-                        "'foo' is not one of ['Arn', 'DomainName', "
-                        "'DualStackDomainName', 'RegionalDomainName', "
-                        "'MetadataTableConfiguration.S3TablesDestination.TableNamespace',"
-                        " 'MetadataTableConfiguration.S3TablesDestination.TableArn',"
-                        " 'WebsiteURL'] "
-                        "in ['us-east-1']"
-                    ),
+                    "'foo' is not one of ['Arn', 'DomainName', "
+                    "'DualStackDomainName', 'RegionalDomainName', "
+                    "'MetadataTableConfiguration.S3TablesDestination.TableNamespace',"
+                    " 'MetadataTableConfiguration.S3TablesDestination.TableArn',"
+                    " 'WebsiteURL'] "
+                    "in ['us-east-1']",
                     path=deque(["Fn::GetAtt", 1]),
                     schema_path=deque([]),
                     validator="fn_getatt",
@@ -96,10 +94,8 @@ def validate(self, validator, s, instance, schema):
             {},
             [
                 ValidationError(
-                    (
-                        "'Foo' is not one of ['MyBucket', "
-                        "'MyCodePipeline', 'DocDBCluster']"
-                    ),
+                    "'Foo' is not one of ['MyBucket', "
+                    "'MyCodePipeline', 'DocDBCluster']",
                     path=deque(["Fn::GetAtt", 0]),
                     schema_path=deque(["enum"]),
                     validator="fn_getatt",
@@ -219,14 +215,12 @@ def validate(self, validator, s, instance, schema):
             {},
             [
                 ValidationError(
-                    (
-                        "'MyBucket' is not one of ['Arn', 'DomainName', "
-                        "'DualStackDomainName', 'RegionalDomainName', "
-                        "'MetadataTableConfiguration.S3TablesDestination.TableNamespace',"
-                        " 'MetadataTableConfiguration.S3TablesDestination.TableArn',"
-                        " 'WebsiteURL'] in ['us-east-1'] when "
-                        "{'Ref': 'MyResourceParameter'} is resolved"
-                    ),
+                    "'MyBucket' is not one of ['Arn', 'DomainName', "
+                    "'DualStackDomainName', 'RegionalDomainName', "
+                    "'MetadataTableConfiguration.S3TablesDestination.TableNamespace',"
+                    " 'MetadataTableConfiguration.S3TablesDestination.TableArn',"
+                    " 'WebsiteURL'] in ['us-east-1'] when "
+                    "{'Ref': 'MyResourceParameter'} is resolved",
                     path=deque(["Fn::GetAtt", 1]),
                     validator="fn_getatt",
                 )
@@ -240,11 +234,9 @@ def validate(self, validator, s, instance, schema):
             {},
             [
                 ValidationError(
-                    (
-                        "'Arn' is not one of ['MyBucket', "
-                        "'MyCodePipeline', 'DocDBCluster'] when "
-                        "{'Ref': 'MyAttributeParameter'} is resolved"
-                    ),
+                    "'Arn' is not one of ['MyBucket', "
+                    "'MyCodePipeline', 'DocDBCluster'] when "
+                    "{'Ref': 'MyAttributeParameter'} is resolved",
                     path=deque(["Fn::GetAtt", 0]),
                     schema_path=deque(["enum"]),
                     validator="fn_getatt",
diff --git a/test/unit/rules/functions/test_getatt_format.py b/test/unit/rules/functions/test_getatt_format.py
index 8a590eb7d3..b095b4fd1f 100644
--- a/test/unit/rules/functions/test_getatt_format.py
+++ b/test/unit/rules/functions/test_getatt_format.py
@@ -78,10 +78,8 @@ def template():
             {"format": "AWS::EC2::VPC.Id"},
             [
                 ValidationError(
-                    (
-                        "{'Fn::GetAtt': ['MyBucket', 'Arn']} "
-                        "does not match destination format of 'AWS::EC2::VPC.Id'"
-                    ),
+                    "{'Fn::GetAtt': ['MyBucket', 'Arn']} "
+                    "does not match destination format of 'AWS::EC2::VPC.Id'",
                     rule=GetAttFormat(),
                 )
             ],
@@ -92,11 +90,9 @@ def template():
             {"format": "AWS::EC2::VPC.Id"},
             [
                 ValidationError(
-                    (
-                        "{'Fn::GetAtt': ['MyBucket', 'WebsiteURL']} "
-                        "with formats ['uri'] does not match "
-                        "destination format of 'AWS::EC2::VPC.Id'"
-                    ),
+                    "{'Fn::GetAtt': ['MyBucket', 'WebsiteURL']} "
+                    "with formats ['uri'] does not match "
+                    "destination format of 'AWS::EC2::VPC.Id'",
                     rule=GetAttFormat(),
                 )
             ],
diff --git a/test/unit/rules/functions/test_if.py b/test/unit/rules/functions/test_if.py
index 62c98eed2a..e26ba3f130 100644
--- a/test/unit/rules/functions/test_if.py
+++ b/test/unit/rules/functions/test_if.py
@@ -166,16 +166,14 @@ def validator(cfn, context):
             {"type": "boolean"},
             [
                 ValidationError(
-                    (
-                        "['Fn::If', 1] is not reachable. When setting condition "
-                        "'IsUsEast1' to True from current status False"
-                    ),
+                    "['Fn::If', 1] is not reachable. When setting condition "
+                    "'IsUsEast1' to True from current status False",
                     path=deque(["Fn::If", 2, "Fn::If", 1]),
                     schema_path=deque(["fn_if"]),
                     validator="fn_if",
                 ),
                 ValidationError(
-                    ("'foo' is not of type 'boolean'"),
+                    "'foo' is not of type 'boolean'",
                     path=deque(["Fn::If", 2, "Fn::If", 1]),
                     schema_path=deque(["fn_if", "type"]),
                     validator="type",
diff --git a/test/unit/rules/functions/test_join.py b/test/unit/rules/functions/test_join.py
index 5b4daace95..b7c9685c21 100644
--- a/test/unit/rules/functions/test_join.py
+++ b/test/unit/rules/functions/test_join.py
@@ -139,10 +139,8 @@ def rule():
             {"type": "string"},
             [
                 ValidationError(
-                    (
-                        "{'Fn::Split': ['-', {'Ref': 'MyResource'}]} "
-                        "is not of type 'string'"
-                    ),
+                    "{'Fn::Split': ['-', {'Ref': 'MyResource'}]} "
+                    "is not of type 'string'",
                     path=deque(["Fn::Join", 1, 0]),
                     schema_path=deque(
                         [
diff --git a/test/unit/rules/functions/test_length.py b/test/unit/rules/functions/test_length.py
index 66fb781b6b..d6e7e4d37e 100644
--- a/test/unit/rules/functions/test_length.py
+++ b/test/unit/rules/functions/test_length.py
@@ -27,10 +27,8 @@ def rule():
             {},
             [
                 ValidationError(
-                    (
-                        "Fn::Length is not supported without "
-                        "'AWS::LanguageExtensions' transform"
-                    ),
+                    "Fn::Length is not supported without "
+                    "'AWS::LanguageExtensions' transform",
                     path=deque([]),
                     schema_path=deque([]),
                     validator="fn_length",
diff --git a/test/unit/rules/functions/test_ref.py b/test/unit/rules/functions/test_ref.py
index d1bfaf4dad..9fe1c32738 100644
--- a/test/unit/rules/functions/test_ref.py
+++ b/test/unit/rules/functions/test_ref.py
@@ -71,13 +71,11 @@ def context(cfn):
             {},
             [
                 ValidationError(
-                    (
-                        "['foo'] is not one of ['MyParameter', 'MyArrayParameter', "
-                        "'MyVolume', 'MyInstance', 'AWS::AccountId', "
-                        "'AWS::NoValue', 'AWS::NotificationARNs', "
-                        "'AWS::Partition', 'AWS::Region', "
-                        "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']"
-                    ),
+                    "['foo'] is not one of ['MyParameter', 'MyArrayParameter', "
+                    "'MyVolume', 'MyInstance', 'AWS::AccountId', "
+                    "'AWS::NoValue', 'AWS::NotificationARNs', "
+                    "'AWS::Partition', 'AWS::Region', "
+                    "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']",
                     path=deque(["Ref"]),
                     schema_path=deque(
                         ["else", "cfnContext", "schema", "dynamicValidation", "enum"]
@@ -106,13 +104,11 @@ def context(cfn):
             {},
             [
                 ValidationError(
-                    (
-                        "'Foo' is not one of ['MyParameter', 'MyArrayParameter', "
-                        "'MyVolume', 'MyInstance', 'AWS::AccountId', "
-                        "'AWS::NoValue', 'AWS::NotificationARNs', "
-                        "'AWS::Partition', 'AWS::Region', "
-                        "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']"
-                    ),
+                    "'Foo' is not one of ['MyParameter', 'MyArrayParameter', "
+                    "'MyVolume', 'MyInstance', 'AWS::AccountId', "
+                    "'AWS::NoValue', 'AWS::NotificationARNs', "
+                    "'AWS::Partition', 'AWS::Region', "
+                    "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']",
                     path=deque(["Ref"]),
                     schema_path=deque(
                         ["else", "cfnContext", "schema", "dynamicValidation", "enum"]
diff --git a/test/unit/rules/functions/test_ref_format.py b/test/unit/rules/functions/test_ref_format.py
index 5c7b260136..62e8ddc05d 100644
--- a/test/unit/rules/functions/test_ref_format.py
+++ b/test/unit/rules/functions/test_ref_format.py
@@ -47,11 +47,9 @@ def template():
             {"format": "AWS::EC2::Image.Id"},
             [
                 ValidationError(
-                    (
-                        "{'Ref': 'MyVpc'} with formats "
-                        "['AWS::EC2::VPC.Id'] does not match "
-                        "destination format of 'AWS::EC2::Image.Id'"
-                    ),
+                    "{'Ref': 'MyVpc'} with formats "
+                    "['AWS::EC2::VPC.Id'] does not match "
+                    "destination format of 'AWS::EC2::Image.Id'",
                     rule=RefFormat(),
                 )
             ],
@@ -62,10 +60,8 @@ def template():
             {"format": "AWS::EC2::Image.Id"},
             [
                 ValidationError(
-                    (
-                        "{'Ref': 'MyBucket'} does not match "
-                        "destination format of 'AWS::EC2::Image.Id'"
-                    ),
+                    "{'Ref': 'MyBucket'} does not match "
+                    "destination format of 'AWS::EC2::Image.Id'",
                     rule=RefFormat(),
                 )
             ],
diff --git a/test/unit/rules/functions/test_select.py b/test/unit/rules/functions/test_select.py
index ed162dcfd1..8e28ac47bf 100644
--- a/test/unit/rules/functions/test_select.py
+++ b/test/unit/rules/functions/test_select.py
@@ -144,10 +144,8 @@ def template():
             {"type": "string"},
             [
                 ValidationError(
-                    (
-                        "{'Fn::Select': [1, ['foo', {'foo': 'bar'}]]} is not of type "
-                        "'string' when 'Fn::Select' is resolved"
-                    ),
+                    "{'Fn::Select': [1, ['foo', {'foo': 'bar'}]]} is not of type "
+                    "'string' when 'Fn::Select' is resolved",
                     path=deque(["Fn::Select"]),
                     schema_path=deque(["type"]),
                     validator="fn_select",
diff --git a/test/unit/rules/functions/test_sub.py b/test/unit/rules/functions/test_sub.py
index 98c06f48b2..e9e2de8c27 100644
--- a/test/unit/rules/functions/test_sub.py
+++ b/test/unit/rules/functions/test_sub.py
@@ -100,13 +100,11 @@ def cfn():
             {"type": "string"},
             [
                 ValidationError(
-                    (
-                        "'bar' is not one of ["
-                        "'MyParameter', 'MyResource', 'MySimpleAd', 'MyPolicy', "
-                        "'AWS::AccountId', 'AWS::NoValue', 'AWS::NotificationARNs', "
-                        "'AWS::Partition', 'AWS::Region', "
-                        "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']"
-                    ),
+                    "'bar' is not one of ["
+                    "'MyParameter', 'MyResource', 'MySimpleAd', 'MyPolicy', "
+                    "'AWS::AccountId', 'AWS::NoValue', 'AWS::NotificationARNs', "
+                    "'AWS::Partition', 'AWS::Region', "
+                    "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque([]),
                     validator="fn_sub",
@@ -119,13 +117,11 @@ def cfn():
             {"type": "string"},
             [
                 ValidationError(
-                    (
-                        "'foo' is not one of ["
-                        "'MyParameter', 'MyResource', 'MySimpleAd', 'MyPolicy', "
-                        "'AWS::AccountId', 'AWS::NoValue', 'AWS::NotificationARNs', "
-                        "'AWS::Partition', 'AWS::Region', "
-                        "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']"
-                    ),
+                    "'foo' is not one of ["
+                    "'MyParameter', 'MyResource', 'MySimpleAd', 'MyPolicy', "
+                    "'AWS::AccountId', 'AWS::NoValue', 'AWS::NotificationARNs', "
+                    "'AWS::Partition', 'AWS::Region', "
+                    "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque([]),
                     validator="fn_sub",
@@ -174,10 +170,8 @@ def cfn():
             {"type": "string"},
             [
                 ValidationError(
-                    (
-                        "{'Fn::Split': [',', '${AWS::AccountId}']} is "
-                        "not of type 'array', 'string'"
-                    ),
+                    "{'Fn::Split': [',', '${AWS::AccountId}']} is "
+                    "not of type 'array', 'string'",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque(["cfnContext", "schema", "type"]),
                     validator="fn_sub",
@@ -288,15 +282,13 @@ def cfn():
             {"type": "string"},
             [
                 ValidationError(
-                    (
-                        "'Foo' is not one of ['Arn', "
-                        "'DomainName', "
-                        "'DualStackDomainName', "
-                        "'RegionalDomainName', "
-                        "'MetadataTableConfiguration.S3TablesDestination.TableNamespace',"
-                        " 'MetadataTableConfiguration.S3TablesDestination.TableArn',"
-                        " 'WebsiteURL'] in ['us-east-1']"
-                    ),
+                    "'Foo' is not one of ['Arn', "
+                    "'DomainName', "
+                    "'DualStackDomainName', "
+                    "'RegionalDomainName', "
+                    "'MetadataTableConfiguration.S3TablesDestination.TableNamespace',"
+                    " 'MetadataTableConfiguration.S3TablesDestination.TableArn',"
+                    " 'WebsiteURL'] in ['us-east-1']",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque([]),
                     validator="fn_sub",
@@ -322,7 +314,7 @@ def cfn():
             {"type": "string"},
             [
                 ValidationError(
-                    ("'MySimpleAd.DnsIpAddresses' is not of type 'string'"),
+                    "'MySimpleAd.DnsIpAddresses' is not of type 'string'",
                     instance="MySimpleAd.DnsIpAddresses",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque([]),
@@ -336,7 +328,7 @@ def cfn():
             {"type": "string"},
             [
                 ValidationError(
-                    ("'MyPolicy.AttachmentCount' is not of type 'string'"),
+                    "'MyPolicy.AttachmentCount' is not of type 'string'",
                     instance="MySimpleAd.DnsIpAddresses",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque([]),
@@ -356,14 +348,14 @@ def cfn():
             {"type": "string", "const": "three"},
             [
                 ValidationError(
-                    ("'three' was expected when 'Fn::Sub' is resolved"),
+                    "'three' was expected when 'Fn::Sub' is resolved",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque(["const"]),
                     validator="fn_sub",
                     rule=SubResolved(),
                 ),
                 ValidationError(
-                    ("'three' was expected when 'Fn::Sub' is resolved"),
+                    "'three' was expected when 'Fn::Sub' is resolved",
                     path=deque(["Fn::Sub"]),
                     schema_path=deque(["const"]),
                     validator="fn_sub",
diff --git a/test/unit/rules/functions/test_tojsonstring.py b/test/unit/rules/functions/test_tojsonstring.py
index a36fb87cbf..84311682f0 100644
--- a/test/unit/rules/functions/test_tojsonstring.py
+++ b/test/unit/rules/functions/test_tojsonstring.py
@@ -39,10 +39,8 @@ def cfn():
             {},
             [
                 ValidationError(
-                    (
-                        "Fn::ToJsonString is not supported without "
-                        "'AWS::LanguageExtensions' transform"
-                    ),
+                    "Fn::ToJsonString is not supported without "
+                    "'AWS::LanguageExtensions' transform",
                     path=deque([]),
                     schema_path=deque([]),
                     validator="fn_tojsonstring",
@@ -109,12 +107,10 @@ def cfn():
             {"transforms": Transforms(["AWS::LanguageExtensions"])},
             [
                 ValidationError(
-                    (
-                        "'AWS::NotificationARNs' is not one of "
-                        "['MyResource', 'AWS::AccountId', "
-                        "'AWS::NoValue', 'AWS::Partition', 'AWS::Region', "
-                        "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']"
-                    ),
+                    "'AWS::NotificationARNs' is not one of "
+                    "['MyResource', 'AWS::AccountId', "
+                    "'AWS::NoValue', 'AWS::Partition', 'AWS::Region', "
+                    "'AWS::StackId', 'AWS::StackName', 'AWS::URLSuffix']",
                     path=deque(["Fn::ToJsonString", "Ref"]),
                     schema_path=deque(
                         [
diff --git a/test/unit/rules/helpers/test_get_resource_by_name.py b/test/unit/rules/helpers/test_get_resource_by_name.py
index 408b902efd..67bc4a5f22 100644
--- a/test/unit/rules/helpers/test_get_resource_by_name.py
+++ b/test/unit/rules/helpers/test_get_resource_by_name.py
@@ -161,9 +161,9 @@ def test_get_resource_by_name(name, resource_name, types, status, expected, vali
     result = get_resource_by_name(validator, resource_name, types)
 
     assert result[0] == expected[0], f"Test {name!r} got {result[0]!r}"
-    assert (
-        result[1].context.conditions.status == expected[1]
-    ), f"Test {name!r} got {result[1].context.conditions.status!r}"
-    assert (
-        result[1].context.path.path == expected[2]
-    ), f"Test {name!r} got {result[1].context.path.path!r}"
+    assert result[1].context.conditions.status == expected[1], (
+        f"Test {name!r} got {result[1].context.conditions.status!r}"
+    )
+    assert result[1].context.path.path == expected[2], (
+        f"Test {name!r} got {result[1].context.path.path!r}"
+    )
diff --git a/test/unit/rules/helpers/test_get_value_from_path.py b/test/unit/rules/helpers/test_get_value_from_path.py
index bdcf72672c..a648eb5100 100644
--- a/test/unit/rules/helpers/test_get_value_from_path.py
+++ b/test/unit/rules/helpers/test_get_value_from_path.py
@@ -19,7 +19,9 @@ def template():
         "Parameters": {
             "ImageId": {
                 "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
-                "Default": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2",  # noqa: E501
+                "Default": (  # noqa: E501
+                    "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2"
+                ),
             }
         },
         "Conditions": {
@@ -186,9 +188,9 @@ def test_get_value_from_path(name, instance, v_path, status, expected, validator
     assert len(results) == len(expected), f"Test {name!r} got {len(results)!r}"
     for result, exp in zip(results, expected):
         assert result[0] == exp[0], f"Test {name!r} got {result[0]!r}"
-        assert (
-            result[1].context.conditions.status == exp[1]
-        ), f"Test {name!r} got {result[1].context.conditions.status!r}"
-        assert (
-            result[1].context.path.path == exp[2]
-        ), f"Test {name!r} got {result[1].context.path.path!r}"
+        assert result[1].context.conditions.status == exp[1], (
+            f"Test {name!r} got {result[1].context.conditions.status!r}"
+        )
+        assert result[1].context.path.path == exp[2], (
+            f"Test {name!r} got {result[1].context.path.path!r}"
+        )
diff --git a/test/unit/rules/jsonschema/test_property_names.py b/test/unit/rules/jsonschema/test_property_names.py
index ba63486d0b..689e8207e9 100644
--- a/test/unit/rules/jsonschema/test_property_names.py
+++ b/test/unit/rules/jsonschema/test_property_names.py
@@ -91,7 +91,6 @@ def test_property_names(self):
 
 
 class TestPropertyNames(BaseRuleTestCase):
-
     def test_rule_no_rule_id(self):
         validator = CfnTemplateValidator({})
 
diff --git a/test/unit/rules/mappings/test_configuration.py b/test/unit/rules/mappings/test_configuration.py
index 536dabc7ac..e268dcbfaf 100644
--- a/test/unit/rules/mappings/test_configuration.py
+++ b/test/unit/rules/mappings/test_configuration.py
@@ -86,10 +86,8 @@ def rule():
             {"MyMapping": {"Key": {"Value": {}}}},
             [
                 ValidationError(
-                    (
-                        "{} is not of type 'string', 'boolean', "
-                        "'integer', 'number', 'array'"
-                    ),
+                    "{} is not of type 'string', 'boolean', "
+                    "'integer', 'number', 'array'",
                     validator="type",
                     schema_path=deque(
                         [
diff --git a/test/unit/rules/metadata/test_cfn_lint.py b/test/unit/rules/metadata/test_cfn_lint.py
index ef67d03127..53e7ad4f6a 100644
--- a/test/unit/rules/metadata/test_cfn_lint.py
+++ b/test/unit/rules/metadata/test_cfn_lint.py
@@ -30,10 +30,8 @@ def rule():
             {"config": {"ignore_bad_key": ["E3002"]}},
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed "
-                        "('ignore_bad_key' was unexpected)"
-                    ),
+                    "Additional properties are not allowed "
+                    "('ignore_bad_key' was unexpected)",
                     validator="additionalProperties",
                     schema_path=deque(["properties", "config", "additionalProperties"]),
                     rule=CfnLint(),
diff --git a/test/unit/rules/metadata/test_config.py b/test/unit/rules/metadata/test_config.py
index c3f2d8ed9a..9660cfce2e 100644
--- a/test/unit/rules/metadata/test_config.py
+++ b/test/unit/rules/metadata/test_config.py
@@ -30,7 +30,7 @@ def rule():
             [],
             [
                 ValidationError(
-                    ("[] is not of type 'object'"),
+                    "[] is not of type 'object'",
                     validator="type",
                     schema_path=deque(["type"]),
                     rule=Configuration(),
@@ -42,11 +42,9 @@ def rule():
             {"foo": None},
             [
                 ValidationError(
-                    (
-                        "None is not of type "
-                        "'string', 'integer', 'object', "
-                        "'array', 'boolean'"
-                    ),
+                    "None is not of type "
+                    "'string', 'integer', 'object', "
+                    "'array', 'boolean'",
                     validator="type",
                     schema_path=deque(["additionalProperties", "type"]),
                     path=deque(["foo"]),
diff --git a/test/unit/rules/metadata/test_interface_configuration.py b/test/unit/rules/metadata/test_interface_configuration.py
index 843b128307..c5489bb38a 100644
--- a/test/unit/rules/metadata/test_interface_configuration.py
+++ b/test/unit/rules/metadata/test_interface_configuration.py
@@ -51,7 +51,7 @@ def template():
             {"Foo": "Bar"},
             [
                 ValidationError(
-                    ("Additional properties are not allowed " "('Foo' was unexpected)"),
+                    "Additional properties are not allowed ('Foo' was unexpected)",
                     validator="additionalProperties",
                     schema_path=deque(["additionalProperties"]),
                     rule=InterfaceConfiguration(),
diff --git a/test/unit/rules/metadata/test_interface_parameter_exists.py b/test/unit/rules/metadata/test_interface_parameter_exists.py
index 8b81f171d4..90c74e7b19 100644
--- a/test/unit/rules/metadata/test_interface_parameter_exists.py
+++ b/test/unit/rules/metadata/test_interface_parameter_exists.py
@@ -39,7 +39,7 @@ def template():
             "Bar",
             [
                 ValidationError(
-                    ("'Bar' is not one of ['Foo']"),
+                    "'Bar' is not one of ['Foo']",
                     validator="enum",
                     schema_path=deque(["enum"]),
                     rule=InterfaceParameterExists(),
diff --git a/test/unit/rules/outputs/test_configuration.py b/test/unit/rules/outputs/test_configuration.py
index 2f5fc1988c..815f0eb364 100644
--- a/test/unit/rules/outputs/test_configuration.py
+++ b/test/unit/rules/outputs/test_configuration.py
@@ -78,7 +78,7 @@ def context(cfn):
             },
             [
                 ValidationError(
-                    ("Additional properties are not allowed ('Name' was unexpected)"),
+                    "Additional properties are not allowed ('Name' was unexpected)",
                     validator="additionalProperties",
                     schema_path=deque(
                         [
@@ -112,8 +112,7 @@ def context(cfn):
         (
             "Long key name",
             {
-                "a"
-                * 256: {
+                "a" * 256: {
                     "Value": "Foo",
                 }
             },
diff --git a/test/unit/rules/outputs/test_importvalue.py b/test/unit/rules/outputs/test_importvalue.py
index a1b2cd0421..5f0b7001d7 100644
--- a/test/unit/rules/outputs/test_importvalue.py
+++ b/test/unit/rules/outputs/test_importvalue.py
@@ -47,10 +47,8 @@ def rule():
             {"type": "string"},
             [
                 ValidationError(
-                    (
-                        "The output value {'Fn::ImportValue': 'Export'} "
-                        "is an import from another output"
-                    ),
+                    "The output value {'Fn::ImportValue': 'Export'} "
+                    "is an import from another output",
                     path=deque(["Fn::ImportValue"]),
                     rule=ImportValue(),
                 )
diff --git a/test/unit/rules/outputs/test_value.py b/test/unit/rules/outputs/test_value.py
index 3bc68b0e5b..742cfa0822 100644
--- a/test/unit/rules/outputs/test_value.py
+++ b/test/unit/rules/outputs/test_value.py
@@ -67,7 +67,6 @@ def path():
 
 @pytest.fixture
 def validator(cfn, context):
-
     ref = Ref()
     ref.child_rules["W1030"] = RefResolved()
 
@@ -143,10 +142,8 @@ def validator(cfn, context):
             },
             [
                 ValidationError(
-                    (
-                        "The output value {'Fn::ImportValue': 'test-stack-value'} "
-                        "is an import from another output"
-                    ),
+                    "The output value {'Fn::ImportValue': 'test-stack-value'} "
+                    "is an import from another output",
                     validator="fn_importvalue",
                     schema_path=deque(["fn_importvalue"]),
                     path=deque(["Value", "Fn::ImportValue"]),
@@ -178,11 +175,11 @@ def validator(cfn, context):
             },
             [
                 ValidationError(
-                    (
-                        "{'Ref': 'badAdditionalVpcCidr'} does not match "
-                        "'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\\\/([0-9]|[1-2][0-9]|3[0-2]))$'"
-                        " when 'Ref' is resolved"
-                    ),
+                    "{'Ref': 'badAdditionalVpcCidr'} does not match"
+                    " '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\\\.)"
+                    "{3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])"
+                    "(\\\\/([0-9]|[1-2][0-9]|3[0-2]))$'"
+                    " when 'Ref' is resolved",
                     validator="ref",
                     schema_path=deque(
                         [
diff --git a/test/unit/rules/parameters/test_allowed_pattern.py b/test/unit/rules/parameters/test_allowed_pattern.py
index b24d8c20dc..fa917f39ca 100644
--- a/test/unit/rules/parameters/test_allowed_pattern.py
+++ b/test/unit/rules/parameters/test_allowed_pattern.py
@@ -30,11 +30,9 @@ def rule():
             "^abc|def)$",
             [
                 ValidationError(
-                    (
-                        "'^abc|def)$' could not be "
-                        "compiled (unbalanced parenthesis "
-                        "at position 8)"
-                    ),
+                    "'^abc|def)$' could not be "
+                    "compiled (unbalanced parenthesis "
+                    "at position 8)",
                     rule=AllowedPattern(),
                 )
             ],
diff --git a/test/unit/rules/parameters/test_configuration.py b/test/unit/rules/parameters/test_configuration.py
index c2aefe5bdb..e4f385df5a 100644
--- a/test/unit/rules/parameters/test_configuration.py
+++ b/test/unit/rules/parameters/test_configuration.py
@@ -93,11 +93,9 @@ def context(cfn):
             },
             [
                 ValidationError(
-                    (
-                        "'AllowedPattern' is not one of ['AllowedValues', "
-                        "'ConstraintDescription', 'Default', 'Description', "
-                        "'MaxValue', 'MinValue', 'NoEcho', 'Type']"
-                    ),
+                    "'AllowedPattern' is not one of ['AllowedValues', "
+                    "'ConstraintDescription', 'Default', 'Description', "
+                    "'MaxValue', 'MinValue', 'NoEcho', 'Type']",
                     validator="enum",
                     schema_path=deque(
                         [
@@ -123,12 +121,10 @@ def context(cfn):
             },
             [
                 ValidationError(
-                    (
-                        "'MinValue' is not one of ['AllowedPattern', "
-                        "'AllowedValues', 'ConstraintDescription', "
-                        "'Default', 'Description', 'MaxLength', "
-                        "'MinLength', 'NoEcho', 'Type']"
-                    ),
+                    "'MinValue' is not one of ['AllowedPattern', "
+                    "'AllowedValues', 'ConstraintDescription', "
+                    "'Default', 'Description', 'MaxLength', "
+                    "'MinLength', 'NoEcho', 'Type']",
                     validator="enum",
                     schema_path=deque(
                         [
@@ -165,8 +161,7 @@ def context(cfn):
         (
             "Long key name",
             {
-                "a"
-                * 256: {
+                "a" * 256: {
                     "Type": "String",
                 }
             },
diff --git a/test/unit/rules/resources/apigateway/test_rest_api_mixing_definition.py b/test/unit/rules/resources/apigateway/test_rest_api_mixing_definition.py
index 8a96664bb9..b0153f5ba7 100644
--- a/test/unit/rules/resources/apigateway/test_rest_api_mixing_definition.py
+++ b/test/unit/rules/resources/apigateway/test_rest_api_mixing_definition.py
@@ -105,12 +105,10 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Defining 'Body' with a relation to "
-                        "resource 'RootResource' of type "
-                        "'AWS::ApiGateway::Resource' may result "
-                        "in drift and orphaned resources"
-                    ),
+                    "Defining 'Body' with a relation to "
+                    "resource 'RootResource' of type "
+                    "'AWS::ApiGateway::Resource' may result "
+                    "in drift and orphaned resources",
                     rule=RestApiMixingDefinitions(),
                     path=deque([]),
                 )
@@ -141,21 +139,17 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Defining 'Body' with a relation to "
-                        "resource 'RootResource' of type "
-                        "'AWS::ApiGateway::Resource' may result "
-                        "in drift and orphaned resources"
-                    ),
+                    "Defining 'Body' with a relation to "
+                    "resource 'RootResource' of type "
+                    "'AWS::ApiGateway::Resource' may result "
+                    "in drift and orphaned resources",
                     rule=RestApiMixingDefinitions(),
                 ),
                 ValidationError(
-                    (
-                        "Defining 'Body' with a relation to "
-                        "resource 'Model' of type "
-                        "'AWS::ApiGateway::Model' may result "
-                        "in drift and orphaned resources"
-                    ),
+                    "Defining 'Body' with a relation to "
+                    "resource 'Model' of type "
+                    "'AWS::ApiGateway::Model' may result "
+                    "in drift and orphaned resources",
                     rule=RestApiMixingDefinitions(),
                 ),
             ],
diff --git a/test/unit/rules/resources/apigateway/test_restapi_openapi.py b/test/unit/rules/resources/apigateway/test_restapi_openapi.py
index 046c819852..9428172ba3 100644
--- a/test/unit/rules/resources/apigateway/test_restapi_openapi.py
+++ b/test/unit/rules/resources/apigateway/test_restapi_openapi.py
@@ -42,10 +42,8 @@ def rule():
             {},
             [
                 ValidationError(
-                    (
-                        "'Name' is a required property when not specifying "
-                        "one of ['Body', 'BodyS3Location']"
-                    ),
+                    "'Name' is a required property when not specifying "
+                    "one of ['Body', 'BodyS3Location']",
                     rule=RestApiOpenApi(),
                     path=deque([]),
                     validator="required",
diff --git a/test/unit/rules/resources/backup/test_backup_plan_lifecycle_rule.py b/test/unit/rules/resources/backup/test_backup_plan_lifecycle_rule.py
index 368a4f57b6..54922358fb 100644
--- a/test/unit/rules/resources/backup/test_backup_plan_lifecycle_rule.py
+++ b/test/unit/rules/resources/backup/test_backup_plan_lifecycle_rule.py
@@ -54,10 +54,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "DeleteAfterDays 10 must be at least 90 "
-                        "days after MoveToColdStorageAfterDays 30"
-                    ),
+                    "DeleteAfterDays 10 must be at least 90 "
+                    "days after MoveToColdStorageAfterDays 30",
                     rule=BackupPlanLifecycleRule(),
                     path=deque(["DeleteAfterDays"]),
                 )
diff --git a/test/unit/rules/resources/cloudformation/test_nested_stack_parameters.py b/test/unit/rules/resources/cloudformation/test_nested_stack_parameters.py
index 33726ba2a9..a960f06930 100644
--- a/test/unit/rules/resources/cloudformation/test_nested_stack_parameters.py
+++ b/test/unit/rules/resources/cloudformation/test_nested_stack_parameters.py
@@ -6,8 +6,8 @@
 import logging
 from test.unit.rules import BaseRuleTestCase
 
-from cfnlint.rules.resources.cloudformation.NestedStackParameters import (
-    NestedStackParameters,  # pylint: disable=E0401
+from cfnlint.rules.resources.cloudformation.NestedStackParameters import (  # pylint: disable=E0401
+    NestedStackParameters,
 )
 
 
diff --git a/test/unit/rules/resources/cloudfront/test_aliases.py b/test/unit/rules/resources/cloudfront/test_aliases.py
index 1a55bd172f..92f9ac4de3 100644
--- a/test/unit/rules/resources/cloudfront/test_aliases.py
+++ b/test/unit/rules/resources/cloudfront/test_aliases.py
@@ -74,10 +74,8 @@ def rule():
             "email.*.example.com",
             [
                 ValidationError(
-                    (
-                        "'email.*.example.com' does not match "
-                        "'^(?!.*(?:\\\\.\\\\*\\\\.)).*'"
-                    ),
+                    "'email.*.example.com' does not match "
+                    "'^(?!.*(?:\\\\.\\\\*\\\\.)).*'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
@@ -89,10 +87,8 @@ def rule():
             "WWW.EXAMPLE.COM",
             [
                 ValidationError(
-                    (
-                        "'WWW.EXAMPLE.COM' does not match "
-                        "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'"
-                    ),
+                    "'WWW.EXAMPLE.COM' does not match "
+                    "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
@@ -104,10 +100,8 @@ def rule():
             "-example.com",
             [
                 ValidationError(
-                    (
-                        "'-example.com' does not match "
-                        "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'"
-                    ),
+                    "'-example.com' does not match "
+                    "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
@@ -119,10 +113,8 @@ def rule():
             "example.c",
             [
                 ValidationError(
-                    (
-                        "'example.c' does not match "
-                        "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'"
-                    ),
+                    "'example.c' does not match "
+                    "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
@@ -134,10 +126,8 @@ def rule():
             "www.example.com ",
             [
                 ValidationError(
-                    (
-                        "'www.example.com ' does not match "
-                        "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'"
-                    ),
+                    "'www.example.com ' does not match "
+                    "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
@@ -149,10 +139,8 @@ def rule():
             "www.-example.com",
             [
                 ValidationError(
-                    (
-                        "'www.-example.com' does not match "
-                        "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'"
-                    ),
+                    "'www.-example.com' does not match "
+                    "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
@@ -164,10 +152,8 @@ def rule():
             "-www.example.com",
             [
                 ValidationError(
-                    (
-                        "'-www.example.com' does not match "
-                        "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'"
-                    ),
+                    "'-www.example.com' does not match "
+                    "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
@@ -179,10 +165,8 @@ def rule():
             "www.example.com-",
             [
                 ValidationError(
-                    (
-                        "'www.example.com-' does not match "
-                        "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'"
-                    ),
+                    "'www.example.com-' does not match "
+                    "'^(?:[a-z0-9\\\\*](?:[a-z0-9-]{0,61}[a-z0-9])?\\\\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$'",
                     rule=Aliases(),
                     path=deque([]),
                     validator="pattern",
diff --git a/test/unit/rules/resources/cloudfront/test_distribution_target_origin_id.py b/test/unit/rules/resources/cloudfront/test_distribution_target_origin_id.py
index eeb2e3cb72..d23abdd8a5 100644
--- a/test/unit/rules/resources/cloudfront/test_distribution_target_origin_id.py
+++ b/test/unit/rules/resources/cloudfront/test_distribution_target_origin_id.py
@@ -74,7 +74,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'origin-id' is not one of ['foo', 'bar']"),
+                    "'origin-id' is not one of ['foo', 'bar']",
                     rule=DistributionTargetOriginId(),
                     path=deque([]),
                     validator="enum",
@@ -143,10 +143,7 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'origin-id' is not one of "
-                        "['foo', 'bar', 'group-1', 'group-2']"
-                    ),
+                    "'origin-id' is not one of ['foo', 'bar', 'group-1', 'group-2']",
                     rule=DistributionTargetOriginId(),
                     path=deque([]),
                     validator="enum",
diff --git a/test/unit/rules/resources/codepipeline/test_pipeline_artifact_counts.py b/test/unit/rules/resources/codepipeline/test_pipeline_artifact_counts.py
index 3ddf23bd3f..83d2581303 100644
--- a/test/unit/rules/resources/codepipeline/test_pipeline_artifact_counts.py
+++ b/test/unit/rules/resources/codepipeline/test_pipeline_artifact_counts.py
@@ -88,11 +88,9 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "expected maximum item count: 1, found: 2 "
-                        "when using {'Owner': 'ThirdParty', "
-                        "'Category': 'Source', 'Provider': 'GitHub'}"
-                    ),
+                    "expected maximum item count: 1, found: 2 "
+                    "when using {'Owner': 'ThirdParty', "
+                    "'Category': 'Source', 'Provider': 'GitHub'}",
                     rule=PipelineArtifactCounts(),
                     validator="maxItems",
                     path=deque(["OutputArtifacts"]),
@@ -112,11 +110,9 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'InputArtifacts' is a required "
-                        "property when using {'Owner': 'AWS', "
-                        "'Category': 'Build', 'Provider': 'CodeBuild'}"
-                    ),
+                    "'InputArtifacts' is a required "
+                    "property when using {'Owner': 'AWS', "
+                    "'Category': 'Build', 'Provider': 'CodeBuild'}",
                     rule=PipelineArtifactCounts(),
                     validator="required",
                     path=deque([]),
@@ -138,22 +134,18 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "expected maximum item count: 1, found: 2 when "
-                        "using {'Owner': 'AWS', 'Category': "
-                        "'Deploy', 'Provider': 'S3'}"
-                    ),
+                    "expected maximum item count: 1, found: 2 when "
+                    "using {'Owner': 'AWS', 'Category': "
+                    "'Deploy', 'Provider': 'S3'}",
                     rule=PipelineArtifactCounts(),
                     validator="maxItems",
                     path=deque(["InputArtifacts"]),
                     schema_path=deque(["properties", "InputArtifacts", "maxItems"]),
                 ),
                 ValidationError(
-                    (
-                        "expected maximum item count: 0, found: 2 "
-                        "when using {'Owner': 'AWS', 'Category': "
-                        "'Deploy', 'Provider': 'S3'}"
-                    ),
+                    "expected maximum item count: 0, found: 2 "
+                    "when using {'Owner': 'AWS', 'Category': "
+                    "'Deploy', 'Provider': 'S3'}",
                     rule=PipelineArtifactCounts(),
                     validator="maxItems",
                     path=deque(["OutputArtifacts"]),
diff --git a/test/unit/rules/resources/codepipeline/test_pipeline_artifact_names.py b/test/unit/rules/resources/codepipeline/test_pipeline_artifact_names.py
index 65b144c459..d5dda517a1 100644
--- a/test/unit/rules/resources/codepipeline/test_pipeline_artifact_names.py
+++ b/test/unit/rules/resources/codepipeline/test_pipeline_artifact_names.py
@@ -276,7 +276,6 @@ def _append_queues(queue1: Iterable, queue2: Iterable) -> deque:
     ],
 )
 def test_validate(instances, expected, rule, validator):
-
     errs = []
     for instance in instances:
         instance_validator = validator.evolve(
diff --git a/test/unit/rules/resources/codepipeline/test_pipeline_first_stage_has_source.py b/test/unit/rules/resources/codepipeline/test_pipeline_first_stage_has_source.py
index 9dd948f1da..22f5a26e9b 100644
--- a/test/unit/rules/resources/codepipeline/test_pipeline_first_stage_has_source.py
+++ b/test/unit/rules/resources/codepipeline/test_pipeline_first_stage_has_source.py
@@ -127,10 +127,8 @@ def _append_queues(queue1: Iterable, queue2: Iterable) -> deque:
             },
             [
                 ValidationError(
-                    (
-                        "'Source' is not one of ['Build', 'Approval', "
-                        "'Deploy', 'Test', 'Invoke', 'Compute']"
-                    ),
+                    "'Source' is not one of ['Build', 'Approval', "
+                    "'Deploy', 'Test', 'Invoke', 'Compute']",
                     rule=PipelineFirstStageHasSource(),
                     validator="enum",
                 )
@@ -146,10 +144,8 @@ def _append_queues(queue1: Iterable, queue2: Iterable) -> deque:
             },
             [
                 ValidationError(
-                    (
-                        "'Source' is not one of ['Build', 'Approval', "
-                        "'Deploy', 'Test', 'Invoke', 'Compute']"
-                    ),
+                    "'Source' is not one of ['Build', 'Approval', "
+                    "'Deploy', 'Test', 'Invoke', 'Compute']",
                     rule=PipelineFirstStageHasSource(),
                     validator="enum",
                 )
diff --git a/test/unit/rules/resources/ec2/test_ebs.py b/test/unit/rules/resources/ec2/test_ebs.py
index 492fdefc64..b51fc50d9e 100644
--- a/test/unit/rules/resources/ec2/test_ebs.py
+++ b/test/unit/rules/resources/ec2/test_ebs.py
@@ -50,10 +50,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'Iops' is a required property when 'VolumeType' "
-                        "has a value of 'io1'"
-                    ),
+                    "'Iops' is a required property when 'VolumeType' "
+                    "has a value of 'io1'",
                     rule=Ebs(),
                     path=deque([]),
                     validator="required",
@@ -71,10 +69,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed (Iops) was "
-                        "unexpected when 'VolumeType' has a value of 'standard'"
-                    ),
+                    "Additional properties are not allowed (Iops) was "
+                    "unexpected when 'VolumeType' has a value of 'standard'",
                     rule=Ebs(),
                     path=deque(["Iops"]),
                     validator=None,
diff --git a/test/unit/rules/resources/ec2/test_instance_image_id.py b/test/unit/rules/resources/ec2/test_instance_image_id.py
index 53a0883ea1..c81d4776a7 100644
--- a/test/unit/rules/resources/ec2/test_instance_image_id.py
+++ b/test/unit/rules/resources/ec2/test_instance_image_id.py
@@ -280,6 +280,6 @@ def rule():
 def test_validate(name, instance, expected, rule, validator):
     errs = list(rule.validate(validator, "", instance, {}))
 
-    assert (
-        errs == expected
-    ), f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    assert errs == expected, (
+        f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    )
diff --git a/test/unit/rules/resources/ec2/test_private_ip_with_network_interafce.py b/test/unit/rules/resources/ec2/test_private_ip_with_network_interafce.py
index ea3615250c..b96f7aa6c1 100644
--- a/test/unit/rules/resources/ec2/test_private_ip_with_network_interafce.py
+++ b/test/unit/rules/resources/ec2/test_private_ip_with_network_interafce.py
@@ -190,6 +190,6 @@ def rule():
 def test_validate(name, instance, expected, rule, validator):
     errs = list(rule.validate(validator, "", instance, {}))
 
-    assert (
-        errs == expected
-    ), f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    assert errs == expected, (
+        f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    )
diff --git a/test/unit/rules/resources/ec2/test_sg_all_to_and_from_ports.py b/test/unit/rules/resources/ec2/test_sg_all_to_and_from_ports.py
index a82f8acf59..de843f683c 100644
--- a/test/unit/rules/resources/ec2/test_sg_all_to_and_from_ports.py
+++ b/test/unit/rules/resources/ec2/test_sg_all_to_and_from_ports.py
@@ -54,7 +54,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("Both ['FromPort', 'ToPort'] must " "be -1 when one is -1"),
+                    "Both ['FromPort', 'ToPort'] must be -1 when one is -1",
                     rule=SecurityGroupAllToAndFromPorts(),
                     path=deque([]),
                     validator="required",
@@ -74,7 +74,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("Both ['FromPort', 'ToPort'] must " "be -1 when one is -1"),
+                    "Both ['FromPort', 'ToPort'] must be -1 when one is -1",
                     rule=SecurityGroupAllToAndFromPorts(),
                     path=deque([]),
                     validator="required",
@@ -95,7 +95,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("Both ['FromPort', 'ToPort'] must " "be -1 when one is -1"),
+                    "Both ['FromPort', 'ToPort'] must be -1 when one is -1",
                     rule=SecurityGroupAllToAndFromPorts(),
                     path=deque(["FromPort"]),
                     validator="enum",
@@ -115,7 +115,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("Both ['FromPort', 'ToPort'] must " "be -1 when one is -1"),
+                    "Both ['FromPort', 'ToPort'] must be -1 when one is -1",
                     rule=SecurityGroupAllToAndFromPorts(),
                     path=deque(["ToPort"]),
                     validator="enum",
@@ -136,7 +136,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("Both ['FromPort', 'ToPort'] must " "be -1 when one is -1"),
+                    "Both ['FromPort', 'ToPort'] must be -1 when one is -1",
                     rule=SecurityGroupAllToAndFromPorts(),
                     path=deque(["ToPort"]),
                     validator="enum",
diff --git a/test/unit/rules/resources/ec2/test_sg_protocols_ports_exclusive.py b/test/unit/rules/resources/ec2/test_sg_protocols_ports_exclusive.py
index b4ab0a4d2b..014b0f7c2e 100644
--- a/test/unit/rules/resources/ec2/test_sg_protocols_ports_exclusive.py
+++ b/test/unit/rules/resources/ec2/test_sg_protocols_ports_exclusive.py
@@ -52,10 +52,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "['FromPort', 'ToPort'] are ignored when using "
-                        "'IpProtocol' value -1"
-                    ),
+                    "['FromPort', 'ToPort'] are ignored when using "
+                    "'IpProtocol' value -1",
                     rule=SecurityGroupProtocolsAndPortsExclusive(),
                     path=deque(["FromPort"]),
                     instance=-1,
diff --git a/test/unit/rules/resources/ec2/test_sg_protocols_ports_inclusive.py b/test/unit/rules/resources/ec2/test_sg_protocols_ports_inclusive.py
index 3293eb9fdc..e49c1e786d 100644
--- a/test/unit/rules/resources/ec2/test_sg_protocols_ports_inclusive.py
+++ b/test/unit/rules/resources/ec2/test_sg_protocols_ports_inclusive.py
@@ -45,10 +45,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "['FromPort', 'ToPort'] are required properties "
-                        "when using 'IpProtocol' value 'tcp'"
-                    ),
+                    "['FromPort', 'ToPort'] are required properties "
+                    "when using 'IpProtocol' value 'tcp'",
                     rule=SecurityGroupProtocolsAndPortsInclusive(),
                     path=deque([]),
                     instance={"IpProtocol": "tcp", "FromPort": 1},
diff --git a/test/unit/rules/resources/ec2/test_vpc_subnet_cidr.py b/test/unit/rules/resources/ec2/test_vpc_subnet_cidr.py
index 9bdb0452a4..0ac888b139 100644
--- a/test/unit/rules/resources/ec2/test_vpc_subnet_cidr.py
+++ b/test/unit/rules/resources/ec2/test_vpc_subnet_cidr.py
@@ -169,10 +169,8 @@ def rule():
             {"path": ["Resources", "Vpc", "Properties"]},
             [
                 ValidationError(
-                    (
-                        "'2001:db8::/32' is specified on a VPC that "
-                        "has no ipv6 networks defined"
-                    ),
+                    "'2001:db8::/32' is specified on a VPC that "
+                    "has no ipv6 networks defined",
                     rule=VpcSubnetCidr(),
                     path_override=deque(
                         ["Resources", "VpcV4Subnet1", "Properties", "Ipv6CidrBlock"]
@@ -343,6 +341,6 @@ def rule():
 def test_validate(name, instance, expected, rule, validator):
     errs = list(rule.validate(validator, "", instance, {}))
 
-    assert (
-        errs == expected
-    ), f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    assert errs == expected, (
+        f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    )
diff --git a/test/unit/rules/resources/ec2/test_vpc_subnet_overlap.py b/test/unit/rules/resources/ec2/test_vpc_subnet_overlap.py
index a197cb8e6f..af7b63b6fb 100644
--- a/test/unit/rules/resources/ec2/test_vpc_subnet_overlap.py
+++ b/test/unit/rules/resources/ec2/test_vpc_subnet_overlap.py
@@ -171,10 +171,9 @@ def template():
     indirect=[],
 )
 def test_validate(name, instance, starting_subnets, expected, rule, validator):
-
     rule._subnets = starting_subnets
     errs = list(rule.validate(validator, "", instance, {}))
 
-    assert (
-        errs == expected
-    ), f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    assert errs == expected, (
+        f"Expected test {name!r} to have {expected!r} but got {errs!r}"
+    )
diff --git a/test/unit/rules/resources/ecs/test_ecs_task_fargate_properties.py b/test/unit/rules/resources/ecs/test_ecs_task_fargate_properties.py
index 8d557e623c..e20526400d 100644
--- a/test/unit/rules/resources/ecs/test_ecs_task_fargate_properties.py
+++ b/test/unit/rules/resources/ecs/test_ecs_task_fargate_properties.py
@@ -80,7 +80,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'PlacementConstraints' isn't supported for Fargate tasks"),
+                    "'PlacementConstraints' isn't supported for Fargate tasks",
                     rule=TaskFargateProperties(),
                     path=deque(["PlacementConstraints"]),
                     validator="not",
@@ -106,10 +106,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "128 is not one of ['256', '512', '1024', '2048', "
-                        "'4096', '8192', '16384']"
-                    ),
+                    "128 is not one of ['256', '512', '1024', '2048', "
+                    "'4096', '8192', '16384']",
                     rule=TaskFargateProperties(),
                     path=deque(["Cpu"]),
                     validator="enum",
@@ -145,7 +143,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'NetworkMode' is a required property"),
+                    "'NetworkMode' is a required property",
                     rule=TaskFargateProperties(),
                     path=deque([]),
                     validator="required",
@@ -215,7 +213,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'sumologic' is not one of ['awslogs', 'splunk', 'awsfirelens']"),
+                    "'sumologic' is not one of ['awslogs', 'splunk', 'awsfirelens']",
                     rule=TaskFargateProperties(),
                     path=deque(
                         ["ContainerDefinitions", 0, "LogConfiguration", "LogDriver"]
diff --git a/test/unit/rules/resources/ecs/test_service_dynamic_ports.py b/test/unit/rules/resources/ecs/test_service_dynamic_ports.py
index 198ed90c6b..1b88ef9251 100644
--- a/test/unit/rules/resources/ecs/test_service_dynamic_ports.py
+++ b/test/unit/rules/resources/ecs/test_service_dynamic_ports.py
@@ -258,12 +258,10 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    (
-                        "When using an ECS task definition of host "
-                        "port 0 and associating that container to "
-                        "an ELB the target group has to have a "
-                        "'HealthCheckPort' of 'traffic-port'"
-                    ),
+                    "When using an ECS task definition of host "
+                    "port 0 and associating that container to "
+                    "an ELB the target group has to have a "
+                    "'HealthCheckPort' of 'traffic-port'",
                     validator="const",
                     path_override=deque(
                         ["Resources", "TargetGroup", "Properties", "HealthCheckPort"]
@@ -321,12 +319,10 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    (
-                        "When using an ECS task definition of host "
-                        "port 0 and associating that container to "
-                        "an ELB the target group has to have a "
-                        "'HealthCheckPort' of 'traffic-port'"
-                    ),
+                    "When using an ECS task definition of host "
+                    "port 0 and associating that container to "
+                    "an ELB the target group has to have a "
+                    "'HealthCheckPort' of 'traffic-port'",
                     validator="const",
                     path_override=deque(
                         ["Resources", "TargetGroup", "Properties", "HealthCheckPort"]
@@ -351,12 +347,10 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    (
-                        "When using an ECS task definition of host "
-                        "port 0 and associating that container to "
-                        "an ELB the target group has to have a "
-                        "'HealthCheckPort' of 'traffic-port'"
-                    ),
+                    "When using an ECS task definition of host "
+                    "port 0 and associating that container to "
+                    "an ELB the target group has to have a "
+                    "'HealthCheckPort' of 'traffic-port'",
                     validator="required",
                     path_override=deque(
                         ["Resources", "TargetGroup", "Properties", "HealthCheckPort"]
diff --git a/test/unit/rules/resources/ecs/test_service_fargate.py b/test/unit/rules/resources/ecs/test_service_fargate.py
index 5c62b8b705..ad94fbcd0d 100644
--- a/test/unit/rules/resources/ecs/test_service_fargate.py
+++ b/test/unit/rules/resources/ecs/test_service_fargate.py
@@ -104,7 +104,7 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    ("'RequiresCompatibilities' is a required property"),
+                    "'RequiresCompatibilities' is a required property",
                     validator="required",
                     rule=ServiceFargate(),
                     path_override=deque(["Resources", "TaskDefinition", "Properties"]),
@@ -184,7 +184,7 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    ("'RequiresCompatibilities' is a required property"),
+                    "'RequiresCompatibilities' is a required property",
                     validator="required",
                     rule=ServiceFargate(),
                     path_override=deque(["Resources", "TaskDefinition", "Properties"]),
@@ -262,7 +262,7 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    ("['EC2', 'EXTERNAL'] does not contain items matching 'FARGATE'"),
+                    "['EC2', 'EXTERNAL'] does not contain items matching 'FARGATE'",
                     validator="contains",
                     rule=ServiceFargate(),
                     path_override=deque(
@@ -385,7 +385,7 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    ("'RequiresCompatibilities' is a required property"),
+                    "'RequiresCompatibilities' is a required property",
                     validator="required",
                     rule=ServiceFargate(),
                     path_override=deque(["Resources", "TaskDefinition", "Properties"]),
diff --git a/test/unit/rules/resources/ecs/test_service_network_configuration.py b/test/unit/rules/resources/ecs/test_service_network_configuration.py
index 08215e8bda..6223645c82 100644
--- a/test/unit/rules/resources/ecs/test_service_network_configuration.py
+++ b/test/unit/rules/resources/ecs/test_service_network_configuration.py
@@ -152,7 +152,7 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    ("'NetworkConfiguration' is a required property"),
+                    "'NetworkConfiguration' is a required property",
                     validator="required",
                     rule=ServiceNetworkConfiguration(),
                 )
@@ -181,7 +181,7 @@ def rule():
             deque(["Resources", "Service", "Properties"]),
             [
                 ValidationError(
-                    ("'NetworkConfiguration' is a required property"),
+                    "'NetworkConfiguration' is a required property",
                     validator="required",
                     rule=ServiceNetworkConfiguration(),
                 )
diff --git a/test/unit/rules/resources/ecs/test_task_definition_aws_vpc.py b/test/unit/rules/resources/ecs/test_task_definition_aws_vpc.py
index 3db1ac38f4..774e19cf76 100644
--- a/test/unit/rules/resources/ecs/test_task_definition_aws_vpc.py
+++ b/test/unit/rules/resources/ecs/test_task_definition_aws_vpc.py
@@ -151,7 +151,7 @@ def rule():
                             },
                             {
                                 "op": "replace",
-                                "path": ("/Properties/NetworkMode"),
+                                "path": "/Properties/NetworkMode",
                                 "value": "bridge",
                             },
                         ],
@@ -182,7 +182,7 @@ def rule():
             deque(["Resources", "TaskDefinition", "Properties"]),
             [
                 ValidationError(
-                    ("'80' does not equal 8080"),
+                    "'80' does not equal 8080",
                     validator="const",
                     rule=TaskDefinitionAwsVpc(),
                     path_override=deque(
diff --git a/test/unit/rules/resources/elasticache/test_cache_cluster_engine.py b/test/unit/rules/resources/elasticache/test_cache_cluster_engine.py
index 9d12b59bde..0923431eec 100644
--- a/test/unit/rules/resources/elasticache/test_cache_cluster_engine.py
+++ b/test/unit/rules/resources/elasticache/test_cache_cluster_engine.py
@@ -41,11 +41,9 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'7.1.0' is not one of "
-                        "['4.0.10', '5.0.6', "
-                        "'6.0', '6.2', '7.0', '7.1']"
-                    ),
+                    "'7.1.0' is not one of "
+                    "['4.0.10', '5.0.6', "
+                    "'6.0', '6.2', '7.0', '7.1']",
                     validator="enum",
                     path=deque(["EngineVersion"]),
                     schema_path=[
@@ -67,7 +65,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'oss-redis' is not one of " "['memcached', 'redis', 'valkey']"),
+                    "'oss-redis' is not one of ['memcached', 'redis', 'valkey']",
                     validator="enum",
                     path=deque(["Engine"]),
                     schema_path=["allOf", 0, "then", "properties", "Engine", "enum"],
diff --git a/test/unit/rules/resources/elasticache/test_cache_cluster_failover.py b/test/unit/rules/resources/elasticache/test_cache_cluster_failover.py
index 4ed24bf0d7..eaf63ad033 100644
--- a/test/unit/rules/resources/elasticache/test_cache_cluster_failover.py
+++ b/test/unit/rules/resources/elasticache/test_cache_cluster_failover.py
@@ -5,8 +5,8 @@
 
 from test.unit.rules import BaseRuleTestCase
 
-from cfnlint.rules.resources.elasticache.CacheClusterFailover import (
-    CacheClusterFailover,  # pylint: disable=E0401
+from cfnlint.rules.resources.elasticache.CacheClusterFailover import (  # pylint: disable=E0401
+    CacheClusterFailover,
 )
 
 
diff --git a/test/unit/rules/resources/elb/test_certificate.py b/test/unit/rules/resources/elb/test_certificate.py
index a5fd9bd2c6..6c02724a25 100644
--- a/test/unit/rules/resources/elb/test_certificate.py
+++ b/test/unit/rules/resources/elb/test_certificate.py
@@ -34,7 +34,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'SSLCertificateId' is a required property"),
+                    "'SSLCertificateId' is a required property",
                     rule=Certificate(),
                     path=deque([]),
                     validator="required",
diff --git a/test/unit/rules/resources/elbv2/test_listener_certificate.py b/test/unit/rules/resources/elbv2/test_listener_certificate.py
index fbca794d19..18a204ada7 100644
--- a/test/unit/rules/resources/elbv2/test_listener_certificate.py
+++ b/test/unit/rules/resources/elbv2/test_listener_certificate.py
@@ -36,7 +36,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'Certificates' is a required property"),
+                    "'Certificates' is a required property",
                     rule=ListenerCertificate(),
                     path=deque([]),
                     validator="required",
diff --git a/test/unit/rules/resources/events/test_rule_schedule_expression.py b/test/unit/rules/resources/events/test_rule_schedule_expression.py
index a3a288170e..30484e9b95 100644
--- a/test/unit/rules/resources/events/test_rule_schedule_expression.py
+++ b/test/unit/rules/resources/events/test_rule_schedule_expression.py
@@ -73,7 +73,7 @@ def rule():
             "daily",
             [
                 ValidationError(
-                    ("'daily' has to be either 'cron()' or 'rate()'"),
+                    "'daily' has to be either 'cron()' or 'rate()'",
                 )
             ],
         ),
@@ -82,7 +82,7 @@ def rule():
             "cron()",
             [
                 ValidationError(
-                    ("'' is not of type 'string'"),
+                    "'' is not of type 'string'",
                 )
             ],
         ),
@@ -91,7 +91,7 @@ def rule():
             "rate()",
             [
                 ValidationError(
-                    ("'' is not of type 'string'"),
+                    "'' is not of type 'string'",
                 )
             ],
         ),
@@ -100,7 +100,7 @@ def rule():
             "rate(5)",
             [
                 ValidationError(
-                    ("'5' has to be of format rate(Value Unit)"),
+                    "'5' has to be of format rate(Value Unit)",
                 )
             ],
         ),
@@ -109,7 +109,7 @@ def rule():
             "rate(five minutes)",
             [
                 ValidationError(
-                    ("'five' is not of type 'integer'"),
+                    "'five' is not of type 'integer'",
                 )
             ],
         ),
@@ -118,12 +118,8 @@ def rule():
             "cron(0 */1 * * WED)",
             [
                 ValidationError(
-                    (
-                        (
-                            "'0' is not of length 6. (Minutes Hours "
-                            "Day-of-month Month Day-of-week Year)"
-                        )
-                    ),
+                    "'0' is not of length 6. (Minutes Hours "
+                    "Day-of-month Month Day-of-week Year)",
                 )
             ],
         ),
@@ -135,13 +131,9 @@ def rule():
             "cron(* 1 * * * *)",
             [
                 ValidationError(
-                    (
-                        (
-                            "'*' specifies both Day-of-month and "
-                            "Day-of-week. (Minutes Hours "
-                            "Day-of-month Month Day-of-week Year)"
-                        )
-                    ),
+                    "'*' specifies both Day-of-month and "
+                    "Day-of-week. (Minutes Hours "
+                    "Day-of-month Month Day-of-week Year)",
                 )
             ],
         ),
@@ -150,7 +142,7 @@ def rule():
             "rate(1 minutes)",
             [
                 ValidationError(
-                    ("'minutes' is not one of ['minute', 'hour', 'day']"),
+                    "'minutes' is not one of ['minute', 'hour', 'day']",
                 )
             ],
         ),
@@ -159,13 +151,12 @@ def rule():
             "rate(0 hour)",
             [
                 ValidationError(
-                    ("'0' is less than the minimum of 0"),
+                    "'0' is less than the minimum of 0",
                 )
             ],
         ),
     ],
 )
 def test_validate(name, instance, expected, rule, validator):
-
     errs = list(rule.validate(validator, {}, instance, {}))
     assert errs == expected, f"Test {name!r} got {errs!r}"
diff --git a/test/unit/rules/resources/iam/test_iam_permissions.py b/test/unit/rules/resources/iam/test_iam_permissions.py
index 0586c66b09..e1f96ac403 100644
--- a/test/unit/rules/resources/iam/test_iam_permissions.py
+++ b/test/unit/rules/resources/iam/test_iam_permissions.py
@@ -123,10 +123,8 @@ def rule():
             {"cfn_path": deque(["Resources", "AWS::IAM::ManagedPolicy", "Properties"])},
             [
                 ValidationError(
-                    (
-                        "'' is not a valid action. Must be "
-                        "of the form service:action or '*'"
-                    ),
+                    "'' is not a valid action. Must be "
+                    "of the form service:action or '*'",
                     rule=Permissions(),
                 )
             ],
@@ -205,7 +203,6 @@ def rule():
     indirect=["path"],
 )
 def test_permissions(name, instance, expected, rule, validator):
-
     rule._service_map = {
         "iam": {
             "Actions": {
diff --git a/test/unit/rules/resources/iam/test_identity_policy.py b/test/unit/rules/resources/iam/test_identity_policy.py
index f660d8b724..b2f6d90c46 100644
--- a/test/unit/rules/resources/iam/test_identity_policy.py
+++ b/test/unit/rules/resources/iam/test_identity_policy.py
@@ -63,11 +63,11 @@ def test_object_multiple_effect(self):
         self.assertEqual(len(errs), 2, errs)
         self.assertEqual(
             errs[0].message,
-            ("Only one of ['Action', 'NotAction'] is a required property"),
+            "Only one of ['Action', 'NotAction'] is a required property",
         )
         self.assertEqual(
             errs[1].message,
-            ("Only one of ['Action', 'NotAction'] is a required property"),
+            "Only one of ['Action', 'NotAction'] is a required property",
         )
         self.assertIn(
             ["Statement", 0, "NotAction"], [list(errs[0].path), list(errs[1].path)]
@@ -93,10 +93,14 @@ def test_object_statements(self):
                     ],
                     "Resource": [
                         {
-                            "Fn::Sub": "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                            "Fn::Sub": (
+                                "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                            )
                         },
                         {
-                            "Fn::Sub": "arn:aws:cloudformation:${AWS::Region}:aws:transform/Serverless-2016-10-31"
+                            "Fn::Sub": (
+                                "arn:aws:cloudformation:${AWS::Region}:aws:transform/Serverless-2016-10-31"
+                            )
                         },
                         {
                             "NotValid": [
@@ -119,7 +123,8 @@ def test_object_statements(self):
         self.assertListEqual(list(errs[0].path), ["Statement", 0, "Effect"])
         self.assertEqual(
             errs[1].message,
-            "{'NotValid': ['arn:${AWS::Partition}:iam::123456789012:role/object-role']} is not of type 'string'",
+            "{'NotValid': ['arn:${AWS::Partition}:iam::123456789012:role/object-role']}"
+            " is not of type 'string'",
         )
         self.assertListEqual(list(errs[1].path), ["Statement", 0, "Resource", 2])
 
@@ -156,7 +161,8 @@ def test_string_statements(self):
         self.assertEqual(len(errs), 2, errs)
         self.assertEqual(
             errs[0].message,
-            "{'Fn::Sub': ['arn:${AWS::Partition}:iam::123456789012/role/string-role']} is not of type 'string'",
+            "{'Fn::Sub': ['arn:${AWS::Partition}:iam::123456789012/role/string-role']}"
+            " is not of type 'string'",
         )
         self.assertListEqual(list(errs[0].path), ["Statement", 0, "Resource", 1])
         self.assertEqual(
diff --git a/test/unit/rules/resources/iam/test_resource_policy.py b/test/unit/rules/resources/iam/test_resource_policy.py
index 36b1a9986e..3dd1386e8d 100644
--- a/test/unit/rules/resources/iam/test_resource_policy.py
+++ b/test/unit/rules/resources/iam/test_resource_policy.py
@@ -67,9 +67,14 @@ def test_object_multiple_effect(self):
                         "AWS": [
                             "arn:aws:iam::123456789012:root",
                             "999999999999",
-                            "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1234ABCDE12AB",
+                            (
+                                "arn:aws:iam::cloudfront:user/CloudFront Origin Access"
+                                " Identity E1234ABCDE12AB"
+                            ),
                         ],
-                        "CanonicalUser": "79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be",
+                        "CanonicalUser": (
+                            "79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be"
+                        ),
                     },
                     "Condition": {
                         "Null": {
@@ -89,11 +94,11 @@ def test_object_multiple_effect(self):
         self.assertEqual(len(errs), 2, errs)
         self.assertEqual(
             errs[0].message,
-            ("Only one of ['Action', 'NotAction'] is a required property"),
+            "Only one of ['Action', 'NotAction'] is a required property",
         )
         self.assertEqual(
             errs[1].message,
-            ("Only one of ['Action', 'NotAction'] is a required property"),
+            "Only one of ['Action', 'NotAction'] is a required property",
         )
         self.assertIn(
             ["Statement", 0, "NotAction"], [list(errs[0].path), list(errs[1].path)]
@@ -124,7 +129,9 @@ def test_object_statements(self):
                     ],
                     "Resource": [
                         {
-                            "Fn::Sub": "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                            "Fn::Sub": (
+                                "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                            )
                         },
                         {
                             "NotValid": [
@@ -150,7 +157,8 @@ def test_object_statements(self):
         self.assertListEqual(list(errs[1].path), ["Statement", 0, "Effect"])
         self.assertEqual(
             errs[2].message,
-            "{'NotValid': ['arn:${AWS::Partition}:iam::123456789012:role/object-role']} is not of type 'string'",
+            "{'NotValid': ['arn:${AWS::Partition}:iam::123456789012:role/object-role']}"
+            " is not of type 'string'",
         )
         self.assertListEqual(list(errs[2].path), ["Statement", 0, "Resource", 1])
 
@@ -197,7 +205,8 @@ def test_string_statements(self):
         )
         self.assertEqual(
             errs[1].message,
-            "{'Fn::Sub': ['arn:${AWS::Partition}:iam::123456789012/role/string-role']} is not of type 'string'",
+            "{'Fn::Sub': ['arn:${AWS::Partition}:iam::123456789012/role/string-role']}"
+            " is not of type 'string'",
         )
         self.assertListEqual(list(errs[1].path), ["Statement", 0, "Resource", 1])
         self.assertEqual(
@@ -222,7 +231,9 @@ def test_principal_wildcard(self):
                     "Effect": "Allow",
                     "Action": "*",
                     "Resource": {
-                        "Fn::Sub": "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                        "Fn::Sub": (
+                            "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                        )
                     },
                     "Principal": "*",
                 },
@@ -230,7 +241,9 @@ def test_principal_wildcard(self):
                     "Effect": "Allow",
                     "Action": "*",
                     "Resource": {
-                        "Fn::Sub": "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                        "Fn::Sub": (
+                            "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                        )
                     },
                     "Principal": {
                         "AWS": "*",
@@ -240,7 +253,9 @@ def test_principal_wildcard(self):
                     "Effect": "Allow",
                     "Action": "*",
                     "Resource": {
-                        "Fn::Sub": "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                        "Fn::Sub": (
+                            "arn:${AWS::Partition}:iam::123456789012:role/object-role"
+                        )
                     },
                     "Principal": {"Fn::Sub": "*"},
                 },
@@ -272,7 +287,9 @@ def test_assumed_role(self):
                     "Action": "*",
                     "Resource": "arn:aws:s3:::bucket",
                     "Principal": {
-                        "AWS": "arn:aws:sts::123456789012:assumed-role/rolename/rolesessionname"
+                        "AWS": (
+                            "arn:aws:sts::123456789012:assumed-role/rolename/rolesessionname"
+                        )
                     },
                 },
             ],
@@ -304,7 +321,9 @@ def test_duplicate_sid(self):
                     "Action": "*",
                     "Resource": "arn:aws:s3:::bucket",
                     "Principal": {
-                        "AWS": "arn:aws:sts::123456789012:assumed-role/rolename/rolesessionname"
+                        "AWS": (
+                            "arn:aws:sts::123456789012:assumed-role/rolename/rolesessionname"
+                        )
                     },
                 },
                 {
@@ -313,7 +332,9 @@ def test_duplicate_sid(self):
                     "Action": "*",
                     "Resource": "arn:aws:s3:::bucket",
                     "Principal": {
-                        "AWS": "arn:aws:sts::123456789012:assumed-role/rolename/rolesessionname"
+                        "AWS": (
+                            "arn:aws:sts::123456789012:assumed-role/rolename/rolesessionname"
+                        )
                     },
                 },
             ],
diff --git a/test/unit/rules/resources/iam/test_resource_policy_resource_arn.py b/test/unit/rules/resources/iam/test_resource_policy_resource_arn.py
index 13823130aa..eef1ff75d4 100644
--- a/test/unit/rules/resources/iam/test_resource_policy_resource_arn.py
+++ b/test/unit/rules/resources/iam/test_resource_policy_resource_arn.py
@@ -52,10 +52,8 @@ def rule():
             {"cfn_path": deque(["Resources", "AWS::S3::BucketPolicy", "Properties"])},
             [
                 ValidationError(
-                    (
-                        "'*' does not match "
-                        "'^arn:aws[A-Za-z\\\\-]*?:[^:]+:[^:]*(:(?:\\\\d{12}|\\\\*|aws)?:.+|)$'"
-                    ),
+                    "'*' does not match "
+                    "'^arn:aws[A-Za-z\\\\-]*?:[^:]+:[^:]*(:(?:\\\\d{12}|\\\\*|aws)?:.+|)$'",
                     rule=ResourcePolicyResourceArn(),
                 )
             ],
@@ -66,10 +64,8 @@ def rule():
             {"cfn_path": deque(["Resources", "AWS::S3::BucketPolicy", "Properties"])},
             [
                 ValidationError(
-                    (
-                        "'arn:aws*' does not match "
-                        "'^arn:aws[A-Za-z\\\\-]*?:[^:]+:[^:]*(:(?:\\\\d{12}|\\\\*|aws)?:.+|)$'"
-                    ),
+                    "'arn:aws*' does not match "
+                    "'^arn:aws[A-Za-z\\\\-]*?:[^:]+:[^:]*(:(?:\\\\d{12}|\\\\*|aws)?:.+|)$'",
                     rule=ResourcePolicyResourceArn(),
                 )
             ],
@@ -92,10 +88,8 @@ def rule():
             {"cfn_path": deque(["Resources", "AWS::SQS::QueuePolicy", "Properties"])},
             [
                 ValidationError(
-                    (
-                        "'arn:aws*' does not match "
-                        "'^(arn:aws[A-Za-z\\\\-]*?:[^:]+:[^:]*(:(?:\\\\d{12}|\\\\*|aws)?:.+|)|\\\\*)$'"
-                    ),
+                    "'arn:aws*' does not match "
+                    "'^(arn:aws[A-Za-z\\\\-]*?:[^:]+:[^:]*(:(?:\\\\d{12}|\\\\*|aws)?:.+|)|\\\\*)$'",
                     rule=ResourcePolicyResourceArn(),
                 )
             ],
diff --git a/test/unit/rules/resources/iam/test_role_arn_pattern.py b/test/unit/rules/resources/iam/test_role_arn_pattern.py
index f967fe57c0..ec6ad2cbc3 100644
--- a/test/unit/rules/resources/iam/test_role_arn_pattern.py
+++ b/test/unit/rules/resources/iam/test_role_arn_pattern.py
@@ -31,10 +31,8 @@ def _message_errors(name, arn, errors, **kwargs):
             "Invalid Arn",
             "test",
             [
-                (
-                    "'test' does not match '^arn:(aws[a-zA-Z-]*)?:"
-                    "iam::\\\\d{12}:role/[a-zA-Z_0-9+=,.@\\\\-_/]+$'"
-                )
+                "'test' does not match '^arn:(aws[a-zA-Z-]*)?:"
+                "iam::\\\\d{12}:role/[a-zA-Z_0-9+=,.@\\\\-_/]+$'"
             ],
         ),
         (
diff --git a/test/unit/rules/resources/iam/test_statement_resources.py b/test/unit/rules/resources/iam/test_statement_resources.py
index 64c57f0097..d17f04bd66 100644
--- a/test/unit/rules/resources/iam/test_statement_resources.py
+++ b/test/unit/rules/resources/iam/test_statement_resources.py
@@ -247,11 +247,9 @@ def template():
             },
             [
                 ValidationError(
-                    (
-                        "action 'cloudformation:CreateStack' "
-                        "requires a resource of "
-                        "['arn:${Partition}:cloudformation:${Region}:${Account}:stack/.*']"
-                    ),
+                    "action 'cloudformation:CreateStack' "
+                    "requires a resource of "
+                    "['arn:${Partition}:cloudformation:${Region}:${Account}:stack/.*']",
                     rule=StatementResources(),
                     path=deque(["Resource"]),
                 ),
@@ -271,11 +269,9 @@ def template():
             },
             [
                 ValidationError(
-                    (
-                        "action 'cloudformation:CreateStack' "
-                        "requires a resource of "
-                        "['arn:${Partition}:cloudformation:${Region}:${Account}:stack/.*']"
-                    ),
+                    "action 'cloudformation:CreateStack' "
+                    "requires a resource of "
+                    "['arn:${Partition}:cloudformation:${Region}:${Account}:stack/.*']",
                     rule=StatementResources(),
                     path=deque(["Resource"]),
                 ),
@@ -333,11 +329,9 @@ def template():
             },
             [
                 ValidationError(
-                    (
-                        "action 'cloudformation:CreateStack' requires "
-                        "a resource of "
-                        "['arn:${Partition}:cloudformation:${Region}:${Account}:stack/.*']"
-                    ),
+                    "action 'cloudformation:CreateStack' requires "
+                    "a resource of "
+                    "['arn:${Partition}:cloudformation:${Region}:${Account}:stack/.*']",
                     rule=StatementResources(),
                     path=deque(["Resource"]),
                 ),
diff --git a/test/unit/rules/resources/lmbd/test_deprecated_runtime_create.py b/test/unit/rules/resources/lmbd/test_deprecated_runtime_create.py
index 56bc3d9666..46a35451a1 100644
--- a/test/unit/rules/resources/lmbd/test_deprecated_runtime_create.py
+++ b/test/unit/rules/resources/lmbd/test_deprecated_runtime_create.py
@@ -40,12 +40,10 @@ def rule():
             datetime(2024, 1, 9),
             [
                 ValidationError(
-                    (
-                        "Runtime 'python3.7' was deprecated on "
-                        "'2023-12-04'. Creation was disabled on "
-                        "'2024-01-09' and update on '2025-11-01'. "
-                        "Please consider updating to 'python3.13'"
-                    ),
+                    "Runtime 'python3.7' was deprecated on "
+                    "'2023-12-04'. Creation was disabled on "
+                    "'2024-01-09' and update on '2025-11-01'. "
+                    "Please consider updating to 'python3.13'",
                 )
             ],
         ),
diff --git a/test/unit/rules/resources/lmbd/test_deprecated_runtime_eol.py b/test/unit/rules/resources/lmbd/test_deprecated_runtime_eol.py
index 1b85a419b9..8c73fb643c 100644
--- a/test/unit/rules/resources/lmbd/test_deprecated_runtime_eol.py
+++ b/test/unit/rules/resources/lmbd/test_deprecated_runtime_eol.py
@@ -40,12 +40,10 @@ def rule():
             datetime(2023, 12, 4),
             [
                 ValidationError(
-                    (
-                        "Runtime 'python3.7' was deprecated on "
-                        "'2023-12-04'. Creation was disabled on "
-                        "'2024-01-09' and update on '2025-11-01'. "
-                        "Please consider updating to 'python3.13'"
-                    ),
+                    "Runtime 'python3.7' was deprecated on "
+                    "'2023-12-04'. Creation was disabled on "
+                    "'2024-01-09' and update on '2025-11-01'. "
+                    "Please consider updating to 'python3.13'",
                 )
             ],
         ),
diff --git a/test/unit/rules/resources/lmbd/test_deprecated_runtime_update.py b/test/unit/rules/resources/lmbd/test_deprecated_runtime_update.py
index eae44c947f..862f94a798 100644
--- a/test/unit/rules/resources/lmbd/test_deprecated_runtime_update.py
+++ b/test/unit/rules/resources/lmbd/test_deprecated_runtime_update.py
@@ -40,12 +40,10 @@ def rule():
             datetime(2025, 11, 2),
             [
                 ValidationError(
-                    (
-                        "Runtime 'python3.7' was deprecated on "
-                        "'2023-12-04'. Creation was disabled on "
-                        "'2024-01-09' and update on '2025-11-01'. "
-                        "Please consider updating to 'python3.13'"
-                    ),
+                    "Runtime 'python3.7' was deprecated on "
+                    "'2023-12-04'. Creation was disabled on "
+                    "'2024-01-09' and update on '2025-11-01'. "
+                    "Please consider updating to 'python3.13'",
                 )
             ],
         ),
@@ -55,12 +53,10 @@ def rule():
             datetime(2016, 10, 31),
             [
                 ValidationError(
-                    (
-                        "Runtime 'nodejs' was deprecated on "
-                        "'2016-10-31'. Creation was disabled on "
-                        "'2016-10-31' and update on '2016-10-31'. "
-                        "Please consider updating to 'nodejs22.x'"
-                    ),
+                    "Runtime 'nodejs' was deprecated on "
+                    "'2016-10-31'. Creation was disabled on "
+                    "'2016-10-31' and update on '2016-10-31'. "
+                    "Please consider updating to 'nodejs22.x'",
                 )
             ],
         ),
diff --git a/test/unit/rules/resources/lmbd/test_event_source_mapping_to_sqs_timeout.py b/test/unit/rules/resources/lmbd/test_event_source_mapping_to_sqs_timeout.py
index 66aa1efac7..ff242c5455 100644
--- a/test/unit/rules/resources/lmbd/test_event_source_mapping_to_sqs_timeout.py
+++ b/test/unit/rules/resources/lmbd/test_event_source_mapping_to_sqs_timeout.py
@@ -85,9 +85,7 @@ def rule():
                 [
                     {
                         "op": "add",
-                        "path": (
-                            "/Resources/MyFifoQueue/" "Properties/VisibilityTimeout"
-                        ),
+                        "path": "/Resources/MyFifoQueue/Properties/VisibilityTimeout",
                         "value": "300",
                     },
                 ],
@@ -102,9 +100,7 @@ def rule():
                 [
                     {
                         "op": "add",
-                        "path": (
-                            "/Resources/MyFifoQueue/" "Properties/VisibilityTimeout"
-                        ),
+                        "path": "/Resources/MyFifoQueue/Properties/VisibilityTimeout",
                         "value": {"Ref": "AWS::Region"},
                     },
                 ],
@@ -119,9 +115,7 @@ def rule():
                 [
                     {
                         "op": "add",
-                        "path": (
-                            "/Resources/MyFifoQueue/" "Properties/VisibilityTimeout"
-                        ),
+                        "path": "/Resources/MyFifoQueue/Properties/VisibilityTimeout",
                         "value": "a",
                     },
                 ],
@@ -141,10 +135,8 @@ def rule():
             {"path": deque(["Resources", "Lambda", "Properties", "Timeout"])},
             [
                 ValidationError(
-                    (
-                        "Queue visibility timeout (300) is less "
-                        "than Function timeout (600) seconds"
-                    ),
+                    "Queue visibility timeout (300) is less "
+                    "than Function timeout (600) seconds",
                     rule=EventSourceMappingToSqsTimeout(),
                 )
             ],
diff --git a/test/unit/rules/resources/lmbd/test_function_environment_keys.py b/test/unit/rules/resources/lmbd/test_function_environment_keys.py
index bad7695b21..a88d2a5c2d 100644
--- a/test/unit/rules/resources/lmbd/test_function_environment_keys.py
+++ b/test/unit/rules/resources/lmbd/test_function_environment_keys.py
@@ -28,21 +28,19 @@ def rule():
             {"AWS_REGION": "Bar"},
             [
                 ValidationError(
-                    (
-                        "'AWS_REGION' is a reserved variable name, one of "
-                        "['_HANDLER', '_X_AMZN_TRACE_ID', 'AWS_DEFAULT_REGION', "
-                        "'AWS_REGION', 'AWS_EXECUTION_ENV', "
-                        "'AWS_LAMBDA_FUNCTION_NAME', "
-                        "'AWS_LAMBDA_FUNCTION_MEMORY_SIZE', "
-                        "'AWS_LAMBDA_FUNCTION_VERSION', "
-                        "'AWS_LAMBDA_INITIALIZATION_TYPE', "
-                        "'AWS_LAMBDA_LOG_GROUP_NAME', "
-                        "'AWS_LAMBDA_LOG_STREAM_NAME', "
-                        "'AWS_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', "
-                        "'AWS_SECRET_ACCESS_KEY', "
-                        "'AWS_SESSION_TOKEN', 'AWS_LAMBDA_RUNTIME_API', "
-                        "'LAMBDA_TASK_ROOT', 'LAMBDA_RUNTIME_DIR']"
-                    ),
+                    "'AWS_REGION' is a reserved variable name, one of "
+                    "['_HANDLER', '_X_AMZN_TRACE_ID', 'AWS_DEFAULT_REGION', "
+                    "'AWS_REGION', 'AWS_EXECUTION_ENV', "
+                    "'AWS_LAMBDA_FUNCTION_NAME', "
+                    "'AWS_LAMBDA_FUNCTION_MEMORY_SIZE', "
+                    "'AWS_LAMBDA_FUNCTION_VERSION', "
+                    "'AWS_LAMBDA_INITIALIZATION_TYPE', "
+                    "'AWS_LAMBDA_LOG_GROUP_NAME', "
+                    "'AWS_LAMBDA_LOG_STREAM_NAME', "
+                    "'AWS_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', "
+                    "'AWS_SECRET_ACCESS_KEY', "
+                    "'AWS_SESSION_TOKEN', 'AWS_LAMBDA_RUNTIME_API', "
+                    "'LAMBDA_TASK_ROOT', 'LAMBDA_RUNTIME_DIR']",
                     schema_path=deque(["propertyNames", "not"]),
                     path=deque(["AWS_REGION"]),
                     rule=FunctionEnvironmentKeys(),
@@ -59,42 +57,38 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'AWS_REGION' is a reserved variable name, one of "
-                        "['_HANDLER', '_X_AMZN_TRACE_ID', 'AWS_DEFAULT_REGION', "
-                        "'AWS_REGION', 'AWS_EXECUTION_ENV', "
-                        "'AWS_LAMBDA_FUNCTION_NAME', "
-                        "'AWS_LAMBDA_FUNCTION_MEMORY_SIZE', "
-                        "'AWS_LAMBDA_FUNCTION_VERSION', "
-                        "'AWS_LAMBDA_INITIALIZATION_TYPE', "
-                        "'AWS_LAMBDA_LOG_GROUP_NAME', "
-                        "'AWS_LAMBDA_LOG_STREAM_NAME', "
-                        "'AWS_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', "
-                        "'AWS_SECRET_ACCESS_KEY', "
-                        "'AWS_SESSION_TOKEN', 'AWS_LAMBDA_RUNTIME_API', "
-                        "'LAMBDA_TASK_ROOT', 'LAMBDA_RUNTIME_DIR']"
-                    ),
+                    "'AWS_REGION' is a reserved variable name, one of "
+                    "['_HANDLER', '_X_AMZN_TRACE_ID', 'AWS_DEFAULT_REGION', "
+                    "'AWS_REGION', 'AWS_EXECUTION_ENV', "
+                    "'AWS_LAMBDA_FUNCTION_NAME', "
+                    "'AWS_LAMBDA_FUNCTION_MEMORY_SIZE', "
+                    "'AWS_LAMBDA_FUNCTION_VERSION', "
+                    "'AWS_LAMBDA_INITIALIZATION_TYPE', "
+                    "'AWS_LAMBDA_LOG_GROUP_NAME', "
+                    "'AWS_LAMBDA_LOG_STREAM_NAME', "
+                    "'AWS_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', "
+                    "'AWS_SECRET_ACCESS_KEY', "
+                    "'AWS_SESSION_TOKEN', 'AWS_LAMBDA_RUNTIME_API', "
+                    "'LAMBDA_TASK_ROOT', 'LAMBDA_RUNTIME_DIR']",
                     schema_path=deque(["propertyNames", "not"]),
                     path=deque(["AWS_REGION"]),
                     rule=FunctionEnvironmentKeys(),
                     validator="not",
                 ),
                 ValidationError(
-                    (
-                        "'AWS_ACCESS_KEY' is a reserved variable name, one of "
-                        "['_HANDLER', '_X_AMZN_TRACE_ID', 'AWS_DEFAULT_REGION', "
-                        "'AWS_REGION', 'AWS_EXECUTION_ENV', "
-                        "'AWS_LAMBDA_FUNCTION_NAME', "
-                        "'AWS_LAMBDA_FUNCTION_MEMORY_SIZE', "
-                        "'AWS_LAMBDA_FUNCTION_VERSION', "
-                        "'AWS_LAMBDA_INITIALIZATION_TYPE', "
-                        "'AWS_LAMBDA_LOG_GROUP_NAME', "
-                        "'AWS_LAMBDA_LOG_STREAM_NAME', "
-                        "'AWS_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', "
-                        "'AWS_SECRET_ACCESS_KEY', "
-                        "'AWS_SESSION_TOKEN', 'AWS_LAMBDA_RUNTIME_API', "
-                        "'LAMBDA_TASK_ROOT', 'LAMBDA_RUNTIME_DIR']"
-                    ),
+                    "'AWS_ACCESS_KEY' is a reserved variable name, one of "
+                    "['_HANDLER', '_X_AMZN_TRACE_ID', 'AWS_DEFAULT_REGION', "
+                    "'AWS_REGION', 'AWS_EXECUTION_ENV', "
+                    "'AWS_LAMBDA_FUNCTION_NAME', "
+                    "'AWS_LAMBDA_FUNCTION_MEMORY_SIZE', "
+                    "'AWS_LAMBDA_FUNCTION_VERSION', "
+                    "'AWS_LAMBDA_INITIALIZATION_TYPE', "
+                    "'AWS_LAMBDA_LOG_GROUP_NAME', "
+                    "'AWS_LAMBDA_LOG_STREAM_NAME', "
+                    "'AWS_ACCESS_KEY', 'AWS_ACCESS_KEY_ID', "
+                    "'AWS_SECRET_ACCESS_KEY', "
+                    "'AWS_SESSION_TOKEN', 'AWS_LAMBDA_RUNTIME_API', "
+                    "'LAMBDA_TASK_ROOT', 'LAMBDA_RUNTIME_DIR']",
                     schema_path=deque(["propertyNames", "not"]),
                     path=deque(["AWS_ACCESS_KEY"]),
                     rule=FunctionEnvironmentKeys(),
diff --git a/test/unit/rules/resources/lmbd/test_snapstart.py b/test/unit/rules/resources/lmbd/test_snapstart.py
index 80461d2c9e..4272b4e344 100644
--- a/test/unit/rules/resources/lmbd/test_snapstart.py
+++ b/test/unit/rules/resources/lmbd/test_snapstart.py
@@ -77,10 +77,8 @@ def template():
             deque(["Resources", "BadSnapStart", "Properties", "SnapStart", "ApplyOn"]),
             [
                 ValidationError(
-                    (
-                        "'SnapStart' is enabled but an 'AWS::Lambda::Version' "
-                        "resource is not attached"
-                    ),
+                    "'SnapStart' is enabled but an 'AWS::Lambda::Version' "
+                    "resource is not attached",
                 )
             ],
         ),
diff --git a/test/unit/rules/resources/lmbd/test_snapstart_supported.py b/test/unit/rules/resources/lmbd/test_snapstart_supported.py
index 16a457f9b1..26e788f0c5 100644
--- a/test/unit/rules/resources/lmbd/test_snapstart_supported.py
+++ b/test/unit/rules/resources/lmbd/test_snapstart_supported.py
@@ -140,10 +140,8 @@ def rule():
             False,
             [
                 ValidationError(
-                    (
-                        "'dotnetcore2.1' is not supported for "
-                        "'SnapStart' enabled functions"
-                    ),
+                    "'dotnetcore2.1' is not supported for "
+                    "'SnapStart' enabled functions",
                     path=deque(["SnapStart", "ApplyOn"]),
                 )
             ],
@@ -234,9 +232,10 @@ def test_validate(
     errs = list(rule.validate(validator, "", instance, {}))
 
     if child_rule_called:
-        child_rule.validate.assert_called_with(
-            instance.get("Runtime")
-        ), f"{name!r}: child rule not called"
+        (
+            child_rule.validate.assert_called_with(instance.get("Runtime")),
+            f"{name!r}: child rule not called",
+        )
     else:
         child_rule.validate.assert_not_called(), f"{name!r}: child rule called"
 
diff --git a/test/unit/rules/resources/properties/test_availability_zone.py b/test/unit/rules/resources/properties/test_availability_zone.py
index 224ec2279c..e20cdd0442 100644
--- a/test/unit/rules/resources/properties/test_availability_zone.py
+++ b/test/unit/rules/resources/properties/test_availability_zone.py
@@ -115,7 +115,7 @@ def validator_cdk():
             },
             [
                 ValidationError(
-                    ("Avoid hardcoding availability zones 'us-east-1a'"),
+                    "Avoid hardcoding availability zones 'us-east-1a'",
                     rule=AvailabilityZone(),
                 )
             ],
@@ -128,11 +128,11 @@ def validator_cdk():
             },
             [
                 ValidationError(
-                    ("Avoid hardcoding availability zones 'us-east-1a'"),
+                    "Avoid hardcoding availability zones 'us-east-1a'",
                     rule=AvailabilityZone(),
                 ),
                 ValidationError(
-                    ("Avoid hardcoding availability zones 'us-east-1b'"),
+                    "Avoid hardcoding availability zones 'us-east-1b'",
                     rule=AvailabilityZone(),
                 ),
             ],
diff --git a/test/unit/rules/resources/properties/test_enum.py b/test/unit/rules/resources/properties/test_enum.py
index f423c3a60c..488da7f718 100644
--- a/test/unit/rules/resources/properties/test_enum.py
+++ b/test/unit/rules/resources/properties/test_enum.py
@@ -57,7 +57,7 @@ def template():
             {},
             [
                 ValidationError(
-                    ("'a' is not one of ['b']"),
+                    "'a' is not one of ['b']",
                     path=deque([]),
                     schema_path=deque([]),
                     path_override=deque([]),
@@ -71,7 +71,7 @@ def template():
             {"value_path": ["Parameters", "MyString", "AllowedValues", 0]},
             [
                 ValidationError(
-                    ("'a' is not one of ['b']"),
+                    "'a' is not one of ['b']",
                     path=deque([]),
                     schema_path=deque([]),
                     rule=ParameterEnum(),
@@ -112,7 +112,7 @@ def test_validate_enum(name, instance, enums, expected, rule, validator):
             {},
             [
                 ValidationError(
-                    ("'a' is not one of ['b'] (case-insensitive)"),
+                    "'a' is not one of ['b'] (case-insensitive)",
                     path=deque([]),
                     schema_path=deque([]),
                     path_override=deque([]),
@@ -126,7 +126,7 @@ def test_validate_enum(name, instance, enums, expected, rule, validator):
             {"value_path": ["Parameters", "MyString", "AllowedValues", 0]},
             [
                 ValidationError(
-                    ("'a' is not one of ['b'] (case-insensitive)"),
+                    "'a' is not one of ['b'] (case-insensitive)",
                     path=deque([]),
                     schema_path=deque([]),
                     rule=ParameterEnum(),
diff --git a/test/unit/rules/resources/properties/test_image_id.py b/test/unit/rules/resources/properties/test_image_id.py
index c06eeaf5b6..1d47a99d6e 100644
--- a/test/unit/rules/resources/properties/test_image_id.py
+++ b/test/unit/rules/resources/properties/test_image_id.py
@@ -50,10 +50,8 @@ def template():
             "MyString",
             [
                 ValidationError(
-                    (
-                        "'String' is not one of ['AWS::EC2::Image::Id'"
-                        ", 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>']"
-                    ),
+                    "'String' is not one of ['AWS::EC2::Image::Id'"
+                    ", 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>']",
                     path=deque([]),
                     schema_path=deque(["enum"]),
                     validator="enum",
diff --git a/test/unit/rules/resources/properties/test_pattern.py b/test/unit/rules/resources/properties/test_pattern.py
index 12620ca76e..8933fcbde7 100644
--- a/test/unit/rules/resources/properties/test_pattern.py
+++ b/test/unit/rules/resources/properties/test_pattern.py
@@ -53,3 +53,27 @@ def test_pattern_exceptions(rule, validator):
 
     assert len(list(rule.pattern(validator, "foo", "Another AWS::Instance", {}))) == 1
     assert len(list(rule.pattern(validator, "foo", "AWS::Dummy::Resource", {}))) == 0
+
+
+def test_is_exception_method(rule, validator):
+    """Test the _is_exception method directly"""
+    rule.configure({"exceptions": ["AWS::", "Test::"]})
+
+    # Test with allow_exceptions=True (default behavior)
+    validator_with_exceptions = validator.evolve(
+        context=validator.context.evolve(allow_exceptions=True)
+    )
+
+    assert rule._is_exception(validator_with_exceptions, "AWS::EC2::Instance")
+    assert rule._is_exception(validator_with_exceptions, "Test::Resource")
+    assert not rule._is_exception(validator_with_exceptions, "Other::Resource")
+
+    # Test with allow_exceptions=False
+    validator_no_exceptions = validator.evolve(
+        context=validator.context.evolve(allow_exceptions=False)
+    )
+
+    # All should return False when allow_exceptions=False, regardless of pattern match
+    assert not rule._is_exception(validator_no_exceptions, "AWS::EC2::Instance")
+    assert not rule._is_exception(validator_no_exceptions, "Test::Resource")
+    assert not rule._is_exception(validator_no_exceptions, "Other::Resource")
diff --git a/test/unit/rules/resources/properties/test_properties_templated.py b/test/unit/rules/resources/properties/test_properties_templated.py
index 2e95748dea..3f40410071 100644
--- a/test/unit/rules/resources/properties/test_properties_templated.py
+++ b/test/unit/rules/resources/properties/test_properties_templated.py
@@ -53,7 +53,7 @@ def path():
             [],
             [
                 ValidationError(
-                    ("This code may only work with 'package' cli command"),
+                    "This code may only work with 'package' cli command",
                 )
             ],
         ),
diff --git a/test/unit/rules/resources/properties/test_tagging.py b/test/unit/rules/resources/properties/test_tagging.py
index 8cdfd29927..a4c49cc74a 100644
--- a/test/unit/rules/resources/properties/test_tagging.py
+++ b/test/unit/rules/resources/properties/test_tagging.py
@@ -38,7 +38,7 @@ def rule():
             {"taggable": True},
             [
                 ValidationError(
-                    ("array items are not unique for keys ['Key']"),
+                    "array items are not unique for keys ['Key']",
                     path=deque(["Tags"]),
                     schema_path=deque(["properties", "Tags", "uniqueKeys"]),
                     validator="tagging",
@@ -104,7 +104,7 @@ def rule():
             {"taggable": True},
             [
                 ValidationError(
-                    ("'aws:Foo' does not match " "'^(?!aws:).+$'"),
+                    "'aws:Foo' does not match '^(?!aws:).+$'",
                     path=deque(["Tags", 0, "Key"]),
                     schema_path=deque(
                         ["properties", "Tags", "items", "properties", "Key", "pattern"]
@@ -121,11 +121,7 @@ def rule():
             {"taggable": True},
             [
                 ValidationError(
-                    (
-                        "'aws:Foo' does not match any of "
-                        "the regexes: "
-                        "'^(?!aws:).+$'"
-                    ),
+                    "'aws:Foo' does not match any of the regexes: '^(?!aws:).+$'",
                     path=deque(["Tags", "aws:Foo"]),
                     schema_path=deque(["properties", "Tags", "additionalProperties"]),
                     validator="tagging",
diff --git a/test/unit/rules/resources/rds/test_db_cluster_aurora.py b/test/unit/rules/resources/rds/test_db_cluster_aurora.py
index f8c2279aa7..efdcfbd4f4 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_aurora.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_aurora.py
@@ -34,7 +34,7 @@ def rule():
             {"Engine": "aurora-mysql", "StorageType": "io1"},
             [
                 ValidationError(
-                    ("'io1' is not one of ['aurora', 'aurora-iopt1']"),
+                    "'io1' is not one of ['aurora', 'aurora-iopt1']",
                     rule=DbClusterAurora(),
                     path=deque(["StorageType"]),
                     validator="enum",
@@ -53,30 +53,24 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed "
-                        "'AllocatedStorage' when creating Aurora cluster"
-                    ),
+                    "Additional properties are not allowed "
+                    "'AllocatedStorage' when creating Aurora cluster",
                     rule=DbClusterAurora(),
                     path=deque(["AllocatedStorage"]),
                     validator=None,
                     schema_path=deque(["then", "properties", "AllocatedStorage"]),
                 ),
                 ValidationError(
-                    (
-                        "Additional properties are not allowed "
-                        "'DBClusterInstanceClass' when creating Aurora cluster"
-                    ),
+                    "Additional properties are not allowed "
+                    "'DBClusterInstanceClass' when creating Aurora cluster",
                     rule=DbClusterAurora(),
                     path=deque(["DBClusterInstanceClass"]),
                     schema_path=deque(["then", "properties", "DBClusterInstanceClass"]),
                     validator=None,
                 ),
                 ValidationError(
-                    (
-                        "Additional properties are not allowed 'Iops' "
-                        "when creating Aurora cluster"
-                    ),
+                    "Additional properties are not allowed 'Iops' "
+                    "when creating Aurora cluster",
                     rule=DbClusterAurora(),
                     path=deque(["Iops"]),
                     schema_path=deque(["then", "properties", "Iops"]),
diff --git a/test/unit/rules/resources/rds/test_db_cluster_aurora_warning.py b/test/unit/rules/resources/rds/test_db_cluster_aurora_warning.py
index bd90896e2f..2c9c013abd 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_aurora_warning.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_aurora_warning.py
@@ -47,10 +47,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed "
-                        "'PerformanceInsightsEnabled' when creating Aurora cluster"
-                    ),
+                    "Additional properties are not allowed "
+                    "'PerformanceInsightsEnabled' when creating Aurora cluster",
                     rule=DbClusterAuroraWarning(),
                     path=deque(["PerformanceInsightsEnabled"]),
                     validator=None,
diff --git a/test/unit/rules/resources/rds/test_db_cluster_engine_version.py b/test/unit/rules/resources/rds/test_db_cluster_engine_version.py
index 8e17fe77c7..0620e8f979 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_engine_version.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_engine_version.py
@@ -96,7 +96,7 @@ def schema():
             {"Engine": "foo"},
             [
                 ValidationError(
-                    ("'foo' is not one of ['mysql']"),
+                    "'foo' is not one of ['mysql']",
                     rule=DbClusterEngineVersion(),
                     path=deque(["Engine"]),
                     validator="enum",
@@ -110,10 +110,8 @@ def schema():
             {"Engine": "mysql", "EngineVersion": "foo"},
             [
                 ValidationError(
-                    (
-                        "'foo' is not one of ['8.0.39', '8.0.40', "
-                        "'8.0.41', '8.4.3', '8.4.4']"
-                    ),
+                    "'foo' is not one of ['8.0.39', '8.0.40', "
+                    "'8.0.41', '8.4.3', '8.4.4']",
                     rule=DbClusterEngineVersion(),
                     path=deque(["EngineVersion"]),
                     validator="enum",
diff --git a/test/unit/rules/resources/rds/test_db_cluster_instance_class_enum.py b/test/unit/rules/resources/rds/test_db_cluster_instance_class_enum.py
index 57a77c1714..7a9f8cb7f5 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_instance_class_enum.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_instance_class_enum.py
@@ -76,10 +76,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'a' is not one of ['db.m5d.12xlarge', "
-                        "'db.m5d.16xlarge'] in 'us-east-1'"
-                    ),
+                    "'a' is not one of ['db.m5d.12xlarge', "
+                    "'db.m5d.16xlarge'] in 'us-east-1'",
                     rule=DbClusterInstanceClassEnum(),
                     path=deque(["DBClusterInstanceClass"]),
                     validator="enum",
diff --git a/test/unit/rules/resources/rds/test_db_cluster_monitoring.py b/test/unit/rules/resources/rds/test_db_cluster_monitoring.py
index 7c40360a5b..a4aa681057 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_monitoring.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_monitoring.py
@@ -38,10 +38,8 @@ def rule():
             {"MonitoringInterval": "1"},
             [
                 ValidationError(
-                    (
-                        "You must have 'MonitoringRoleArn' specified "
-                        "with 'MonitoringInterval' greater than 0"
-                    ),
+                    "You must have 'MonitoringRoleArn' specified "
+                    "with 'MonitoringInterval' greater than 0",
                     rule=DbClusterMonitoring(),
                     path=deque([]),
                     schema_path=deque(["else", "then", "required"]),
@@ -56,10 +54,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "You must have 'MonitoringRoleArn' specified "
-                        "with 'MonitoringInterval' greater than 0"
-                    ),
+                    "You must have 'MonitoringRoleArn' specified "
+                    "with 'MonitoringInterval' greater than 0",
                     rule=DbClusterMonitoring(),
                     path=deque([]),
                     schema_path=deque(["then", "required"]),
@@ -75,10 +71,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "You must have 'MonitoringRoleArn' specified "
-                        "with 'MonitoringInterval' greater than 0"
-                    ),
+                    "You must have 'MonitoringRoleArn' specified "
+                    "with 'MonitoringInterval' greater than 0",
                     rule=DbClusterMonitoring(),
                     path=deque(["MonitoringInterval"]),
                     schema_path=deque(
diff --git a/test/unit/rules/resources/rds/test_db_cluster_multiaz.py b/test/unit/rules/resources/rds/test_db_cluster_multiaz.py
index 59bb177f98..e5d640e4ec 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_multiaz.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_multiaz.py
@@ -58,7 +58,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'aurora' is not one of ['io1', 'io2', 'gp3']"),
+                    "'aurora' is not one of ['io1', 'io2', 'gp3']",
                     rule=DbClusterMultiAz(),
                     path=deque(["StorageType"]),
                     validator="enum",
@@ -74,28 +74,28 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'AllocatedStorage' is a required property"),
+                    "'AllocatedStorage' is a required property",
                     rule=DbClusterMultiAz(),
                     path=deque([]),
                     validator="required",
                     schema_path=deque(["then", "required"]),
                 ),
                 ValidationError(
-                    ("'DBClusterInstanceClass' is a required property"),
+                    "'DBClusterInstanceClass' is a required property",
                     rule=DbClusterMultiAz(),
                     path=deque([]),
                     validator="required",
                     schema_path=deque(["then", "required"]),
                 ),
                 ValidationError(
-                    ("'Iops' is a required property"),
+                    "'Iops' is a required property",
                     rule=DbClusterMultiAz(),
                     path=deque([]),
                     validator="required",
                     schema_path=deque(["then", "required"]),
                 ),
                 ValidationError(
-                    ("'StorageType' is a required property"),
+                    "'StorageType' is a required property",
                     rule=DbClusterMultiAz(),
                     path=deque([]),
                     validator="required",
@@ -114,10 +114,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed 'Domain' "
-                        "when creating Multi-AZ cluster"
-                    ),
+                    "Additional properties are not allowed 'Domain' "
+                    "when creating Multi-AZ cluster",
                     rule=DbClusterMultiAz(),
                     path=deque(["Domain"]),
                     validator=None,
diff --git a/test/unit/rules/resources/rds/test_db_cluster_serverless_exclusive.py b/test/unit/rules/resources/rds/test_db_cluster_serverless_exclusive.py
index cc82627b36..d14c6f9c90 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_serverless_exclusive.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_serverless_exclusive.py
@@ -38,10 +38,8 @@ def rule():
             {"EngineMode": "serverless", "ServerlessV2ScalingConfiguration": "foo"},
             [
                 ValidationError(
-                    (
-                        "EngineMode 'serverless'  doesn't allow additional "
-                        "properties 'ServerlessV2ScalingConfiguration'"
-                    ),
+                    "EngineMode 'serverless'  doesn't allow additional "
+                    "properties 'ServerlessV2ScalingConfiguration'",
                     rule=DbClusterServerlessExclusive(),
                     path=deque(["ServerlessV2ScalingConfiguration"]),
                     validator=None,
@@ -61,10 +59,8 @@ def rule():
             {"EngineMode": "provisioned", "ScalingConfiguration": "foo"},
             [
                 ValidationError(
-                    (
-                        "EngineMode 'provisioned'  doesn't allow "
-                        "additional properties 'ScalingConfiguration'"
-                    ),
+                    "EngineMode 'provisioned'  doesn't allow "
+                    "additional properties 'ScalingConfiguration'",
                     rule=DbClusterServerlessExclusive(),
                     path=deque(["ScalingConfiguration"]),
                     validator=None,
@@ -82,10 +78,7 @@ def rule():
             {"ScalingConfiguration": "foo"},
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed "
-                        "('ScalingConfiguration')"
-                    ),
+                    "Additional properties are not allowed ('ScalingConfiguration')",
                     rule=DbClusterServerlessExclusive(),
                     path=deque(["ScalingConfiguration"]),
                     validator=None,
diff --git a/test/unit/rules/resources/rds/test_db_cluster_sourcedbclusteridentifier.py b/test/unit/rules/resources/rds/test_db_cluster_sourcedbclusteridentifier.py
index 52d9959861..0bfcdaf001 100644
--- a/test/unit/rules/resources/rds/test_db_cluster_sourcedbclusteridentifier.py
+++ b/test/unit/rules/resources/rds/test_db_cluster_sourcedbclusteridentifier.py
@@ -36,10 +36,8 @@ def rule():
             {"SourceDBClusterIdentifier": "foo", "MasterUsername": "foo"},
             [
                 ValidationError(
-                    (
-                        "Additional properties are ignored ('MasterUsername', "
-                        "'MasterUserPassword', 'StorageEncrypted')"
-                    ),
+                    "Additional properties are ignored ('MasterUsername', "
+                    "'MasterUserPassword', 'StorageEncrypted')",
                     rule=DbClusterSourceDBClusterIdentifier(),
                     path=deque(["MasterUsername"]),
                     validator=None,
diff --git a/test/unit/rules/resources/rds/test_db_instance_aurora_exclusive.py b/test/unit/rules/resources/rds/test_db_instance_aurora_exclusive.py
index 873be2b3ef..030f7ad13c 100644
--- a/test/unit/rules/resources/rds/test_db_instance_aurora_exclusive.py
+++ b/test/unit/rules/resources/rds/test_db_instance_aurora_exclusive.py
@@ -78,11 +78,9 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Additional properties are not "
-                        "allowed (['DeletionProtection', "
-                        "'CopyTagsToSnapshot'])"
-                    ),
+                    "Additional properties are not "
+                    "allowed (['DeletionProtection', "
+                    "'CopyTagsToSnapshot'])",
                     rule=DbInstanceAuroraExclusive(),
                     path=deque([]),
                     instance={
diff --git a/test/unit/rules/resources/rds/test_db_instance_engine_version.py b/test/unit/rules/resources/rds/test_db_instance_engine_version.py
index aa9d3750b5..efd5f48a1e 100644
--- a/test/unit/rules/resources/rds/test_db_instance_engine_version.py
+++ b/test/unit/rules/resources/rds/test_db_instance_engine_version.py
@@ -100,7 +100,7 @@ def schema():
             {"Engine": "foo"},
             [
                 ValidationError(
-                    ("'foo' is not one of ['mysql']"),
+                    "'foo' is not one of ['mysql']",
                     rule=DbInstanceEngineVersion(),
                     path=deque(["Engine"]),
                     validator="enum",
@@ -114,10 +114,8 @@ def schema():
             {"Engine": "mysql", "EngineVersion": "foo"},
             [
                 ValidationError(
-                    (
-                        "'foo' is not one of ['8.0.39', '8.0.40', "
-                        "'8.0.41', '8.4.3', '8.4.4']"
-                    ),
+                    "'foo' is not one of ['8.0.39', '8.0.40', "
+                    "'8.0.41', '8.4.3', '8.4.4']",
                     rule=DbInstanceEngineVersion(),
                     path=deque(["EngineVersion"]),
                     validator="enum",
diff --git a/test/unit/rules/resources/route53/test_recordsets.py b/test/unit/rules/resources/route53/test_recordsets.py
index 11b77f6fd0..433b9813da 100644
--- a/test/unit/rules/resources/route53/test_recordsets.py
+++ b/test/unit/rules/resources/route53/test_recordsets.py
@@ -83,7 +83,8 @@ def rule():
             },
             [
                 ValidationError(
-                    '\'"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"\' does not match \'^("[^"]{1,255}" *)*"[^"]{1,255}"$\'',  # noqa: E501
+                    "'\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"'"
+                    ' does not match \'^("[^"]{1,255}" *)*"[^"]{1,255}"$\'',  # noqa: E501
                     rule=RecordSet(),
                     path=deque(["ResourceRecords", 0]),
                     validator="pattern",
@@ -100,7 +101,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    '\'"a""bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"\' does not match \'^("[^"]{1,255}" *)*"[^"]{1,255}"$\'',  # noqa: E501
+                    '\'"a""bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"\''
+                    ' does not match \'^("[^"]{1,255}" *)*"[^"]{1,255}"$\'',  # noqa: E501
                     rule=RecordSet(),
                     path=deque(["ResourceRecords", 1]),
                     validator="pattern",
@@ -273,10 +275,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'127.0.0.1' does not match "
-                        "'^(0|128)\\\\s([a-zA-Z0-9]+)\\\\s(\".+\")$'"
-                    ),
+                    "'127.0.0.1' does not match "
+                    "'^(0|128)\\\\s([a-zA-Z0-9]+)\\\\s(\".+\")$'",
                     rule=RecordSet(),
                     path=deque(["ResourceRecords", 0]),
                     validator="pattern",
@@ -293,10 +293,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "'0 issue amazon.com; henk' does not match "
-                        "'^(0|128)\\\\s([a-zA-Z0-9]+)\\\\s(\".+\")$'"
-                    ),
+                    "'0 issue amazon.com; henk' does not match "
+                    "'^(0|128)\\\\s([a-zA-Z0-9]+)\\\\s(\".+\")$'",
                     rule=RecordSet(),
                     path=deque(["ResourceRecords", 1]),
                     validator="pattern",
@@ -349,20 +347,16 @@ def rule():
                     context=deque(
                         [
                             ValidationError(
-                                (
-                                    "'foo√bar' does not match "
-                                    "'^[a-zA-Z0-9\\\\!\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,-\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\\\\\\\\\]\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~\\\\.]+$'"
-                                ),  # noqa: E501
+                                "'foo√bar' does not match "
+                                "'^[a-zA-Z0-9\\\\!\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,-\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\\\\\\\\\]\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~\\\\.]+$'",  # noqa: E501
                                 path=deque([]),
                                 validator="pattern",
                                 schema_path=deque([0, "pattern"]),
                                 rule=RecordSet(),
                             ),
                             ValidationError(
-                                (
-                                    "'foo√bar' does not match "
-                                    "'^.*\\\\.acm-validations\\\\.aws\\\\.?$'"
-                                ),
+                                "'foo√bar' does not match "
+                                "'^.*\\\\.acm-validations\\\\.aws\\\\.?$'",
                                 path=deque([]),
                                 validator="pattern",
                                 schema_path=deque([1, "pattern"]),
@@ -410,10 +404,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'No valid domain name' is not valid "
-                        "under any of the given schemas"
-                    ),
+                    "'No valid domain name' is not valid "
+                    "under any of the given schemas",
                     rule=RecordSet(),
                     path=deque(["ResourceRecords", 0]),
                     validator="anyOf",
@@ -430,10 +422,8 @@ def rule():
                                 rule=RecordSet(),
                             ),
                             ValidationError(
-                                (
-                                    "'No valid domain name' does not match "
-                                    "'^.*\\\\.acm-validations\\\\.aws\\\\.?$'"
-                                ),
+                                "'No valid domain name' does not match "
+                                "'^.*\\\\.acm-validations\\\\.aws\\\\.?$'",
                                 path=deque([]),
                                 validator="pattern",
                                 schema_path=deque([1, "pattern"]),
@@ -475,10 +465,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'127.0.0.1' does not match "
-                        "'^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{1-3}|65[0-4][0-9]{1-2}|655[0-2][0-9]|6553[0-5])\\\\s[a-zA-Z0-9\\\\!\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,-\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\\\\\\\\\]\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~\\\\.]+$'"
-                    ),
+                    "'127.0.0.1' does not match "
+                    "'^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{1-3}|65[0-4][0-9]{1-2}|655[0-2][0-9]|6553[0-5])\\\\s[a-zA-Z0-9\\\\!\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,-\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\\\\\\\\\]\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~\\\\.]+$'",
                     rule=RecordSet(),
                     path=deque(["ResourceRecords", 0]),
                     validator="pattern",
@@ -495,10 +483,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "'10 my domain' does not match "
-                        "'^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{1-3}|65[0-4][0-9]{1-2}|655[0-2][0-9]|6553[0-5])\\\\s[a-zA-Z0-9\\\\!\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,-\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\\\\\\\\\]\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~\\\\.]+$'"
-                    ),
+                    "'10 my domain' does not match "
+                    "'^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{1-3}|65[0-4][0-9]{1-2}|655[0-2][0-9]|6553[0-5])\\\\s[a-zA-Z0-9\\\\!\"\\\\#\\\\$\\\\%\\\\&\\\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,-\\\\/\\\\:\\\\;\\\\<\\\\=\\\\>\\\\?\\\\@\\\\[\\\\\\\\\\\\]\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~\\\\.]+$'",
                     rule=RecordSet(),
                     path=deque(["ResourceRecords", 1]),
                     validator="pattern",
diff --git a/test/unit/rules/resources/s3/test_access_control_obsolete.py b/test/unit/rules/resources/s3/test_access_control_obsolete.py
index aa9cabc550..e8823e88f5 100644
--- a/test/unit/rules/resources/s3/test_access_control_obsolete.py
+++ b/test/unit/rules/resources/s3/test_access_control_obsolete.py
@@ -26,10 +26,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'AccessControl' is a legacy property. "
-                        "Consider using 'AWS::S3::BucketPolicy' instead"
-                    ),
+                    "'AccessControl' is a legacy property. "
+                    "Consider using 'AWS::S3::BucketPolicy' instead",
                     path=deque(["AccessControl"]),
                 )
             ],
diff --git a/test/unit/rules/resources/s3/test_access_control_ownership.py b/test/unit/rules/resources/s3/test_access_control_ownership.py
index 5f7d6e5cd1..9005023fc6 100644
--- a/test/unit/rules/resources/s3/test_access_control_ownership.py
+++ b/test/unit/rules/resources/s3/test_access_control_ownership.py
@@ -47,10 +47,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "A bucket with 'AccessControl' set should also "
-                        "have at least one 'OwnershipControl' configured"
-                    ),
+                    "A bucket with 'AccessControl' set should also "
+                    "have at least one 'OwnershipControl' configured",
                     path=deque([]),
                     validator="required",
                     schema_path=deque(["then", "required"]),
@@ -65,10 +63,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "A bucket with 'AccessControl' set should also "
-                        "have at least one 'OwnershipControl' configured"
-                    ),
+                    "A bucket with 'AccessControl' set should also "
+                    "have at least one 'OwnershipControl' configured",
                     path=deque(["OwnershipControls"]),
                     validator="required",
                     schema_path=deque(
@@ -87,10 +83,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "A bucket with 'AccessControl' set should also "
-                        "have at least one 'OwnershipControl' configured"
-                    ),
+                    "A bucket with 'AccessControl' set should also "
+                    "have at least one 'OwnershipControl' configured",
                     path=deque(["OwnershipControls", "Rules"]),
                     validator="minItems",
                     schema_path=deque(
diff --git a/test/unit/rules/resources/s3/test_bucket_tiering_configuration.py b/test/unit/rules/resources/s3/test_bucket_tiering_configuration.py
index 598244a221..b98c41b84a 100644
--- a/test/unit/rules/resources/s3/test_bucket_tiering_configuration.py
+++ b/test/unit/rules/resources/s3/test_bucket_tiering_configuration.py
@@ -51,7 +51,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("1 is less than the minimum of 90"),
+                    "1 is less than the minimum of 90",
                     path=deque(["Days"]),
                     validator="minimum",
                     schema_path=deque(["minimum"]),
@@ -66,7 +66,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("99999 is greater than the maximum of 730"),
+                    "99999 is greater than the maximum of 730",
                     path=deque(["Days"]),
                     validator="maximum",
                     schema_path=deque(["maximum"]),
diff --git a/test/unit/rules/resources/sqs/test_queue_dlq.py b/test/unit/rules/resources/sqs/test_queue_dlq.py
index 2aec0b396f..cd9c171f05 100644
--- a/test/unit/rules/resources/sqs/test_queue_dlq.py
+++ b/test/unit/rules/resources/sqs/test_queue_dlq.py
@@ -123,10 +123,8 @@ def template():
             },
             [
                 ValidationError(
-                    (
-                        "Source queue type 'FIFO' does not match "
-                        "destination queue type 'standard'"
-                    ),
+                    "Source queue type 'FIFO' does not match "
+                    "destination queue type 'standard'",
                     rule=QueueDLQ(),
                     path=deque(["RedrivePolicy", "deadLetterTargetArn"]),
                 )
@@ -141,10 +139,8 @@ def template():
             },
             [
                 ValidationError(
-                    (
-                        "Source queue type 'FIFO' does not match "
-                        "destination queue type 'standard'"
-                    ),
+                    "Source queue type 'FIFO' does not match "
+                    "destination queue type 'standard'",
                     rule=QueueDLQ(),
                     path=deque(["RedrivePolicy", "deadLetterTargetArn"]),
                 )
@@ -159,10 +155,8 @@ def template():
             },
             [
                 ValidationError(
-                    (
-                        "Source queue type 'standard' does not "
-                        "match destination queue type 'FIFO'"
-                    ),
+                    "Source queue type 'standard' does not "
+                    "match destination queue type 'FIFO'",
                     rule=QueueDLQ(),
                     path=deque(["RedrivePolicy", "deadLetterTargetArn"]),
                 )
@@ -189,18 +183,14 @@ def template():
             },
             [
                 ValidationError(
-                    (
-                        "Source queue type 'FIFO' does not match "
-                        "destination queue type 'standard'"
-                    ),
+                    "Source queue type 'FIFO' does not match "
+                    "destination queue type 'standard'",
                     rule=QueueDLQ(),
                     path=deque(["RedrivePolicy", "deadLetterTargetArn", "Fn::If", 1]),
                 ),
                 ValidationError(
-                    (
-                        "Source queue type 'standard' does "
-                        "not match destination queue type 'FIFO'"
-                    ),
+                    "Source queue type 'standard' does "
+                    "not match destination queue type 'FIFO'",
                     rule=QueueDLQ(),
                     path=deque(["RedrivePolicy", "deadLetterTargetArn", "Fn::If", 2]),
                 ),
diff --git a/test/unit/rules/resources/sqs/test_queue_properties.py b/test/unit/rules/resources/sqs/test_queue_properties.py
index 8de3e0d8d1..363c2a0b8d 100644
--- a/test/unit/rules/resources/sqs/test_queue_properties.py
+++ b/test/unit/rules/resources/sqs/test_queue_properties.py
@@ -64,10 +64,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed "
-                        "('ContentBasedDeduplication' was unexpected)"
-                    ),
+                    "Additional properties are not allowed "
+                    "('ContentBasedDeduplication' was unexpected)",
                     rule=QueueProperties(),
                     path=deque(["ContentBasedDeduplication"]),
                     validator=None,
diff --git a/test/unit/rules/resources/ssm/test_document.py b/test/unit/rules/resources/ssm/test_document.py
index 3ca91f30b4..25d8a2f0f1 100644
--- a/test/unit/rules/resources/ssm/test_document.py
+++ b/test/unit/rules/resources/ssm/test_document.py
@@ -76,10 +76,8 @@ def rule():
             "arn:aws-us-gov:iam::123456789012:role/test",
             [
                 ValidationError(
-                    (
-                        "'arn:aws-us-gov:iam::123456789012:role/test' is not "
-                        "of type 'object'"
-                    ),
+                    "'arn:aws-us-gov:iam::123456789012:role/test' is not "
+                    "of type 'object'",
                     rule=Document(),
                     validator="type",
                     schema_path=deque(["type"]),
diff --git a/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py b/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py
index eabe3bb41c..735b7cd331 100644
--- a/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py
+++ b/test/unit/rules/resources/stepfunctions/test_state_machine_definition.py
@@ -44,8 +44,12 @@ def rule():
                             "Resource": "arn:aws:states:::batch:submitJob.sync",
                             "Parameters": {
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -59,8 +63,13 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions succeeded",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions"
+                                    " succeeded"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -68,8 +77,12 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions failed",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions failed"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -82,7 +95,10 @@ def rule():
             "Fan out example",
             {
                 "Definition": {
-                    "Comment": "An example of the Amazon States Language for fanning out AWS Batch job",
+                    "Comment": (
+                        "An example of the Amazon States Language for fanning out AWS"
+                        " Batch job"
+                    ),
                     "StartAt": "Generate batch job input",
                     "TimeoutSeconds": 3600,
                     "States": {
@@ -91,12 +107,17 @@ def rule():
                             "Resource": "arn:aws:states:::lambda:invoke",
                             "OutputPath": "$.Payload",
                             "Parameters": {
-                                "FunctionName": "<GENERATE_BATCH_JOB_INPUT_LAMBDA_FUNCTION_NAME>"
+                                "FunctionName": (
+                                    "<GENERATE_BATCH_JOB_INPUT_LAMBDA_FUNCTION_NAME>"
+                                )
                             },
                             "Next": "Fan out batch jobs",
                         },
                         "Fan out batch jobs": {
-                            "Comment": "Start multiple executions of batch job depending on pre-processed data",
+                            "Comment": (
+                                "Start multiple executions of batch job depending on"
+                                " pre-processed data"
+                            ),
                             "Type": "Map",
                             "End": True,
                             "ItemsPath": "$",
@@ -106,11 +127,15 @@ def rule():
                                 "States": {
                                     "Submit Batch Job": {
                                         "Type": "Task",
-                                        "Resource": "arn:aws:states:::batch:submitJob.sync",
+                                        "Resource": (
+                                            "arn:aws:states:::batch:submitJob.sync"
+                                        ),
                                         "Parameters": {
                                             "JobName": "BatchJobFanOut",
                                             "JobQueue": "<BATCH_QUEUE_ARN>",
-                                            "JobDefinition": "<BATCH_JOB_DEFINITION_ARN>",
+                                            "JobDefinition": (
+                                                "<BATCH_JOB_DEFINITION_ARN>"
+                                            ),
                                         },
                                         "End": True,
                                     }
@@ -125,7 +150,8 @@ def rule():
         (
             "Error handling",
             {
-                "Definition": """
+                "Definition": (
+                    """
                 {
                     "Comment": "An example of the Amazon States Language for notification on an AWS Batch job completion",
                     "StartAt": "Submit Batch Job",
@@ -173,6 +199,7 @@ def rule():
                     }
                 }
             """
+                )
             },
             [],
         ),
@@ -180,13 +207,18 @@ def rule():
             "Transfer data records",
             {
                 "Definition": {
-                    "Comment": "An example of the Amazon States Language for reading messages from a DynamoDB table and sending them to SQS",
+                    "Comment": (
+                        "An example of the Amazon States Language for reading messages"
+                        " from a DynamoDB table and sending them to SQS"
+                    ),
                     "StartAt": "Seed the DynamoDB Table",
                     "TimeoutSeconds": 3600,
                     "States": {
                         "Seed the DynamoDB Table": {
                             "Type": "Task",
-                            "Resource": "arn:aws:lambda:us-east-1:123456789012:function:sqsconnector-SeedingFunction-T3U43VYDU5OQ",
+                            "Resource": (
+                                "arn:aws:lambda:us-east-1:123456789012:function:sqsconnector-SeedingFunction-T3U43VYDU5OQ"
+                            ),
                             "ResultPath": "$.List",
                             "Next": "For Loop Condition",
                         },
@@ -218,7 +250,9 @@ def rule():
                             "Resource": "arn:aws:states:::sqs:sendMessage",
                             "Parameters": {
                                 "MessageBody.$": "$.DynamoDB.Item.Message.S",
-                                "QueueUrl": "https://sqs.us-east-1.amazonaws.com/123456789012/sqsconnector-SQSQueue-QVGQBW134PWK",
+                                "QueueUrl": (
+                                    "https://sqs.us-east-1.amazonaws.com/123456789012/sqsconnector-SQSQueue-QVGQBW134PWK"
+                                ),
                             },
                             "ResultPath": "$.SQS",
                             "Next": "Pop Element from List",
@@ -238,7 +272,10 @@ def rule():
             "A map",
             {
                 "Definition": {
-                    "Comment": "An example of the Amazon States Language for reading messages from an SQS queue and iteratively processing each message.",
+                    "Comment": (
+                        "An example of the Amazon States Language for reading messages"
+                        " from an SQS queue and iteratively processing each message."
+                    ),
                     "StartAt": "Read messages from SQS Queue",
                     "States": {
                         "Read messages from SQS Queue": {
@@ -246,7 +283,9 @@ def rule():
                             "Resource": "arn:aws:states:::lambda:invoke",
                             "OutputPath": "$.Payload",
                             "Parameters": {
-                                "FunctionName": "MapSampleProj-ReadFromSQSQueueLambda-1MY3M63RMJVA9"
+                                "FunctionName": (
+                                    "MapSampleProj-ReadFromSQSQueueLambda-1MY3M63RMJVA9"
+                                )
                             },
                             "Next": "Are there messages to process?",
                         },
@@ -277,7 +316,9 @@ def rule():
                                         "Resource": "arn:aws:states:::dynamodb:putItem",
                                         "ResultPath": None,
                                         "Parameters": {
-                                            "TableName": "MapSampleProj-DDBTable-YJDJ1MKIN6C5",
+                                            "TableName": (
+                                                "MapSampleProj-DDBTable-YJDJ1MKIN6C5"
+                                            ),
                                             "ReturnConsumedCapacity": "TOTAL",
                                             "Item": {
                                                 "MessageId": {
@@ -296,7 +337,9 @@ def rule():
                                         "InputPath": "$.MessageDetails",
                                         "ResultPath": None,
                                         "Parameters": {
-                                            "FunctionName": "MapSampleProj-DeleteFromSQSQueueLambda-198J2839ZO5K2",
+                                            "FunctionName": (
+                                                "MapSampleProj-DeleteFromSQSQueueLambda-198J2839ZO5K2"
+                                            ),
                                             "Payload": {
                                                 "ReceiptHandle.$": "$.ReceiptHandle"
                                             },
@@ -310,7 +353,9 @@ def rule():
                                         "Parameters": {
                                             "Subject": "Message from Step Functions!",
                                             "Message.$": "$.Body",
-                                            "TopicArn": "arn:aws:sns:us-east-1:012345678910:MapSampleProj-SNSTopic-1CQO4HQ3IR1KN",
+                                            "TopicArn": (
+                                                "arn:aws:sns:us-east-1:012345678910:MapSampleProj-SNSTopic-1CQO4HQ3IR1KN"
+                                            ),
                                         },
                                         "End": True,
                                     },
@@ -384,17 +429,23 @@ def rule():
                         },
                         "Public": {
                             "Type": "Task",
-                            "Resource": "arn:aws:lambda:us-east-1:123456789012:function:Foo",
+                            "Resource": (
+                                "arn:aws:lambda:us-east-1:123456789012:function:Foo"
+                            ),
                             "Next": "NextState",
                         },
                         "ValueIsZero": {
                             "Type": "Task",
-                            "Resource": "arn:aws:lambda:us-east-1:123456789012:function:Zero",
+                            "Resource": (
+                                "arn:aws:lambda:us-east-1:123456789012:function:Zero"
+                            ),
                             "Next": "NextState",
                         },
                         "ValueInTwenties": {
                             "Type": "Task",
-                            "Resource": "arn:aws:lambda:us-east-1:123456789012:function:Bar",
+                            "Resource": (
+                                "arn:aws:lambda:us-east-1:123456789012:function:Bar"
+                            ),
                             "Next": "NextState",
                         },
                         "ValueIsNegative": {
@@ -478,13 +529,15 @@ def rule():
         (
             "Invalid string definition",
             {
-                "Definition": """
+                "Definition": (
+                    """
                     {
                         "States": {
                             "NoType": {}
                         }
                     }
                 """
+                )
             },
             [
                 ValidationError(
@@ -533,8 +586,12 @@ def rule():
                             "Resource": "${jobqueue}",
                             "Parameters": {
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -548,8 +605,13 @@ def rule():
                             "Type": "Task",
                             "Resource": "${invalid}",
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions succeeded",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions"
+                                    " succeeded"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -557,8 +619,12 @@ def rule():
                             "Type": "Task",
                             "Resource": [],
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions failed",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions failed"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -567,10 +633,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'${invalid}' does not match "
-                        "'^arn:aws:([a-z]|-)+:([a-z]|[0-9]|-)*:[0-9]*:([a-z]|-)+:[a-zA-Z0-9-_.]+(:(\\\\$LATEST|[a-zA-Z0-9-_\\\\.]+))?$'"
-                    ),
+                    "'${invalid}' does not match "
+                    "'^arn:aws:([a-z]|-)+:([a-z]|[0-9]|-)*:[0-9]*:([a-z]|-)+:[a-zA-Z0-9-_.]+(:(\\\\$LATEST|[a-zA-Z0-9-_\\\\.]+))?$'",
                     rule=StateMachineDefinition(),
                     validator="pattern",
                     schema_path=deque(
@@ -590,7 +654,7 @@ def rule():
                     path=deque(["Definition", "States", "Notify Success", "Resource"]),
                 ),
                 ValidationError(
-                    ("[] is not of type 'string'"),
+                    "[] is not of type 'string'",
                     rule=StateMachineDefinition(),
                     validator="type",
                     schema_path=deque(
@@ -629,8 +693,12 @@ def rule():
                             "Resource": "${jobqueue}",
                             "Parameters": {
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -644,8 +712,13 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions succeeded",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions"
+                                    " succeeded"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -653,8 +726,12 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions failed",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions failed"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -663,10 +740,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'${jobqueue}' does not match "
-                        "'^arn:aws:([a-z]|-)+:([a-z]|[0-9]|-)*:[0-9]*:([a-z]|-)+:[a-zA-Z0-9-_.]+(:(\\\\$LATEST|[a-zA-Z0-9-_\\\\.]+))?$'"
-                    ),
+                    "'${jobqueue}' does not match "
+                    "'^arn:aws:([a-z]|-)+:([a-z]|[0-9]|-)*:[0-9]*:([a-z]|-)+:[a-zA-Z0-9-_.]+(:(\\\\$LATEST|[a-zA-Z0-9-_\\\\.]+))?$'",
                     rule=StateMachineDefinition(),
                     validator="pattern",
                     schema_path=deque(
@@ -712,8 +787,12 @@ def rule():
                             "Resource": "${jobqueue}",
                             "Parameters": {  # fails because JSONata doesn't support Parameters
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -729,8 +808,12 @@ def rule():
                             "Resource": "${jobqueue}",
                             "Arguments": {  # fails because JSONPath doesn't support Arguments
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -746,8 +829,12 @@ def rule():
                             "Resource": "${jobqueue}",
                             "Arguments": {  # fails because JSONPath is the default for Query Language
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -798,8 +885,13 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions succeeded",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions"
+                                    " succeeded"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -807,8 +899,12 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {
-                                "Message": "Batch job submitted through Step Functions failed",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions failed"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -817,9 +913,8 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "Additional properties are not allowed ('Parameters' was unexpected)"
-                    ),
+                    "Additional properties are not allowed ('Parameters' was"
+                    " unexpected)",
                     rule=StateMachineDefinition(),
                     validator=None,
                     schema_path=deque(
@@ -843,9 +938,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "Additional properties are not allowed ('Arguments' was unexpected)"
-                    ),
+                    "Additional properties are not allowed ('Arguments' was"
+                    " unexpected)",
                     rule=StateMachineDefinition(),
                     validator=None,
                     schema_path=deque(
@@ -869,9 +963,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "Additional properties are not allowed ('Arguments' was unexpected)"
-                    ),
+                    "Additional properties are not allowed ('Arguments' was"
+                    " unexpected)",
                     rule=StateMachineDefinition(),
                     validator=None,
                     schema_path=deque(
@@ -895,20 +988,23 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "Only one of ['And', 'BooleanEquals', 'BooleanEqualsPath', 'IsBoolean', 'IsNull', "
-                        "'IsNumeric', 'IsPresent', 'IsString', 'IsTimestamp', 'Not', 'NumericEquals', "
-                        "'NumericEqualsPath', 'NumericGreaterThan', 'NumericGreaterThanPath', "
-                        "'NumericGreaterThanEquals', 'NumericGreaterThanEqualsPath', 'NumericLessThan', "
-                        "'NumericLessThanPath', 'NumericLessThanEquals', 'NumericLessThanEqualsPath', 'Or', "
-                        "'StringEquals', 'StringEqualsPath', 'StringGreaterThan', 'StringGreaterThanPath', "
-                        "'StringGreaterThanEquals', 'StringGreaterThanEqualsPath', 'StringLessThan', "
-                        "'StringLessThanPath', 'StringLessThanEquals', 'StringLessThanEqualsPath', "
-                        "'StringMatches', 'TimestampEquals', 'TimestampEqualsPath', 'TimestampGreaterThan', "
-                        "'TimestampGreaterThanPath', 'TimestampGreaterThanEquals', 'TimestampGreaterThanEqualsPath', "
-                        "'TimestampLessThan', 'TimestampLessThanPath', 'TimestampLessThanEquals', "
-                        "'TimestampLessThanEqualsPath'] is a required property"
-                    ),
+                    "Only one of ['And', 'BooleanEquals', 'BooleanEqualsPath',"
+                    " 'IsBoolean', 'IsNull', 'IsNumeric', 'IsPresent', 'IsString',"
+                    " 'IsTimestamp', 'Not', 'NumericEquals', 'NumericEqualsPath',"
+                    " 'NumericGreaterThan', 'NumericGreaterThanPath',"
+                    " 'NumericGreaterThanEquals', 'NumericGreaterThanEqualsPath',"
+                    " 'NumericLessThan', 'NumericLessThanPath',"
+                    " 'NumericLessThanEquals', 'NumericLessThanEqualsPath', 'Or',"
+                    " 'StringEquals', 'StringEqualsPath', 'StringGreaterThan',"
+                    " 'StringGreaterThanPath', 'StringGreaterThanEquals',"
+                    " 'StringGreaterThanEqualsPath', 'StringLessThan',"
+                    " 'StringLessThanPath', 'StringLessThanEquals',"
+                    " 'StringLessThanEqualsPath', 'StringMatches', 'TimestampEquals',"
+                    " 'TimestampEqualsPath', 'TimestampGreaterThan',"
+                    " 'TimestampGreaterThanPath', 'TimestampGreaterThanEquals',"
+                    " 'TimestampGreaterThanEqualsPath', 'TimestampLessThan',"
+                    " 'TimestampLessThanPath', 'TimestampLessThanEquals',"
+                    " 'TimestampLessThanEqualsPath'] is a required property",
                     rule=StateMachineDefinition(),
                     validator="requiredXor",
                     schema_path=deque(
@@ -932,7 +1028,7 @@ def rule():
                     path=deque(["Definition", "States", "Choices2", "Choices", 0]),
                 ),
                 ValidationError(
-                    ("'Next' is a required property"),
+                    "'Next' is a required property",
                     rule=StateMachineDefinition(),
                     validator="required",
                     schema_path=deque(
@@ -956,7 +1052,7 @@ def rule():
                     path=deque(["Definition", "States", "Choices2", "Choices", 1]),
                 ),
                 ValidationError(
-                    ("'Condition' is a required property"),
+                    "'Condition' is a required property",
                     rule=StateMachineDefinition(),
                     validator="required",
                     schema_path=deque(
@@ -998,11 +1094,17 @@ def rule():
                         "Submit Batch Job 1": {
                             "Type": "Task",
                             "Resource": "${jobqueue}",
-                            "QueryLanguage": "JSONPath",  # fails because QueryLanguage for JSONata can't be over written
+                            "QueryLanguage": (
+                                "JSONPath"
+                            ),  # fails because QueryLanguage for JSONata can't be over written
                             "Parameters": {  # fails because JSONata doesn't support Parameters
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -1017,8 +1119,12 @@ def rule():
                             "Resource": "${jobqueue}",
                             "Arguments": {
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -1034,8 +1140,12 @@ def rule():
                             "Resource": "${jobqueue}",
                             "Arguments": {
                                 "JobName": "BatchJobNotification",
-                                "JobQueue": "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd",
-                                "JobDefinition": "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1",
+                                "JobQueue": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-queue/BatchJobQueue-7049d367474b4dd"
+                                ),
+                                "JobDefinition": (
+                                    "arn:aws:batch:us-east-1:123456789012:job-definition/BatchJobDefinition-74d55ec34c4643c:1"
+                                ),
                             },
                             "Next": "Notify Success",
                             "Catch": [
@@ -1049,8 +1159,13 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {  # fails because the default is now JSONata
-                                "Message": "Batch job submitted through Step Functions succeeded",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions"
+                                    " succeeded"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -1058,7 +1173,9 @@ def rule():
                             "Type": "Choice",
                             "Choices": [
                                 {
-                                    "Condition": "{% $states.input.type != 'Private' %}",
+                                    "Condition": (
+                                        "{% $states.input.type != 'Private' %}"
+                                    ),
                                     "Next": "Notify Failure",
                                 },
                             ],
@@ -1078,8 +1195,12 @@ def rule():
                             "Type": "Task",
                             "Resource": "arn:aws:states:::sns:publish",
                             "Parameters": {  # fails because the default is now JSONata
-                                "Message": "Batch job submitted through Step Functions failed",
-                                "TopicArn": "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM",
+                                "Message": (
+                                    "Batch job submitted through Step Functions failed"
+                                ),
+                                "TopicArn": (
+                                    "arn:aws:sns:us-east-1:123456789012:batchjobnotificatiointemplate-SNSTopic-1J757CVBQ2KHM"
+                                ),
                             },
                             "End": True,
                         },
@@ -1088,7 +1209,7 @@ def rule():
             },
             [
                 ValidationError(
-                    ("'JSONata' was expected"),
+                    "'JSONata' was expected",
                     rule=StateMachineDefinition(),
                     validator="const",
                     schema_path=deque(
@@ -1112,9 +1233,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "Additional properties are not allowed ('Parameters' was unexpected)"
-                    ),
+                    "Additional properties are not allowed ('Parameters' was"
+                    " unexpected)",
                     rule=StateMachineDefinition(),
                     validator=None,
                     schema_path=deque(
@@ -1137,9 +1257,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "Additional properties are not allowed ('Parameters' was unexpected)"
-                    ),
+                    "Additional properties are not allowed ('Parameters' was"
+                    " unexpected)",
                     rule=StateMachineDefinition(),
                     validator=None,
                     schema_path=deque(
@@ -1162,7 +1281,7 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    ("'Condition' is a required property"),
+                    "'Condition' is a required property",
                     rule=StateMachineDefinition(),
                     validator="required",
                     schema_path=deque(
@@ -1185,7 +1304,7 @@ def rule():
                     path=deque(["Definition", "States", "Choices2", "Choices", 0]),
                 ),
                 ValidationError(
-                    ("Additional properties are not allowed ('And' was unexpected)"),
+                    "Additional properties are not allowed ('And' was unexpected)",
                     rule=StateMachineDefinition(),
                     validator="additionalProperties",
                     schema_path=deque(
@@ -1210,9 +1329,8 @@ def rule():
                     ),
                 ),
                 ValidationError(
-                    (
-                        "Additional properties are not allowed ('Parameters' was unexpected)"
-                    ),
+                    "Additional properties are not allowed ('Parameters' was"
+                    " unexpected)",
                     rule=StateMachineDefinition(),
                     validator=None,
                     schema_path=deque(
diff --git a/test/unit/rules/resources/test_both_update_replace_delete_policy.py b/test/unit/rules/resources/test_both_update_replace_delete_policy.py
index c99a3e2fe4..065813765e 100644
--- a/test/unit/rules/resources/test_both_update_replace_delete_policy.py
+++ b/test/unit/rules/resources/test_both_update_replace_delete_policy.py
@@ -56,10 +56,8 @@ def template():
             deque(["Resources", "MyResource"]),
             [
                 ValidationError(
-                    (
-                        "Both 'UpdateReplacePolicy' and 'DeletionPolicy' are "
-                        "needed to protect resource from deletion"
-                    ),
+                    "Both 'UpdateReplacePolicy' and 'DeletionPolicy' are "
+                    "needed to protect resource from deletion",
                     path=deque([]),
                     rule=UpdateReplacePolicyDeletionPolicy(),
                     schema_path=deque(["anyOf"]),
@@ -74,10 +72,8 @@ def template():
             deque(["Resources", "MyResource"]),
             [
                 ValidationError(
-                    (
-                        "Both 'UpdateReplacePolicy' and 'DeletionPolicy' are "
-                        "needed to protect resource from deletion"
-                    ),
+                    "Both 'UpdateReplacePolicy' and 'DeletionPolicy' are "
+                    "needed to protect resource from deletion",
                     path=deque([]),
                     rule=UpdateReplacePolicyDeletionPolicy(),
                     schema_path=deque(["anyOf"]),
diff --git a/test/unit/rules/resources/test_cfn_init.py b/test/unit/rules/resources/test_cfn_init.py
index 072e27426b..03c0013f5b 100644
--- a/test/unit/rules/resources/test_cfn_init.py
+++ b/test/unit/rules/resources/test_cfn_init.py
@@ -95,7 +95,7 @@ def template():
             [],
             [
                 ValidationError(
-                    ("[] is not of type 'object'"),
+                    "[] is not of type 'object'",
                     path=deque([]),
                     schema_path=deque(["type"]),
                     validator="type",
diff --git a/test/unit/rules/resources/test_creationpolicy.py b/test/unit/rules/resources/test_creationpolicy.py
index 047d712fc7..e7c396b314 100644
--- a/test/unit/rules/resources/test_creationpolicy.py
+++ b/test/unit/rules/resources/test_creationpolicy.py
@@ -166,7 +166,6 @@ def template():
     indirect=["path"],
 )
 def test_deletion_policy(name, instance, expected, rule, validator):
-
     rule = CreationPolicy()
     errors = list(
         rule.validate(
diff --git a/test/unit/rules/resources/test_deletionpolicy.py b/test/unit/rules/resources/test_deletionpolicy.py
index ff23f7ae28..e8626d64a2 100644
--- a/test/unit/rules/resources/test_deletionpolicy.py
+++ b/test/unit/rules/resources/test_deletionpolicy.py
@@ -29,10 +29,8 @@
                     rule=DeletionPolicy(),
                 ),
                 ValidationError(
-                    (
-                        "{'Foo': 'Bar'} is not one of ['Delete', 'Retain', "
-                        "'RetainExceptOnCreate', 'Snapshot']"
-                    ),
+                    "{'Foo': 'Bar'} is not one of ['Delete', 'Retain', "
+                    "'RetainExceptOnCreate', 'Snapshot']",
                     schema_path=deque(["enum"]),
                     validator="enum",
                     rule=DeletionPolicy(),
@@ -45,10 +43,8 @@
             deque(["Resources", "MyInstance"]),
             [
                 ValidationError(
-                    (
-                        "'Snapshot' is not one of ['Delete', 'Retain', "
-                        "'RetainExceptOnCreate']"
-                    ),
+                    "'Snapshot' is not one of ['Delete', 'Retain', "
+                    "'RetainExceptOnCreate']",
                     schema_path=deque(["enum"]),
                     validator="enum",
                     rule=DeletionPolicy(),
diff --git a/test/unit/rules/resources/test_deletionpolicy_stateful_resources.py b/test/unit/rules/resources/test_deletionpolicy_stateful_resources.py
index 1d78bb599e..c292713e96 100644
--- a/test/unit/rules/resources/test_deletionpolicy_stateful_resources.py
+++ b/test/unit/rules/resources/test_deletionpolicy_stateful_resources.py
@@ -50,22 +50,18 @@ def rule():
             },
             [
                 ValidationError(
-                    (
-                        "'DeletionPolicy' is a required property (The default "
-                        "action when replacing/removing a resource is to delete "
-                        "it. Set explicit values for stateful resource)"
-                    ),
+                    "'DeletionPolicy' is a required property (The default "
+                    "action when replacing/removing a resource is to delete "
+                    "it. Set explicit values for stateful resource)",
                     rule=UpdateReplacePolicyDeletionPolicyOnStatefulResourceTypes(),
                     path=deque([]),
                     validator="required",
                     schema_path=deque(["required"]),
                 ),
                 ValidationError(
-                    (
-                        "'UpdateReplacePolicy' is a required property (The default "
-                        "action when replacing/removing a resource is to delete "
-                        "it. Set explicit values for stateful resource)"
-                    ),
+                    "'UpdateReplacePolicy' is a required property (The default "
+                    "action when replacing/removing a resource is to delete "
+                    "it. Set explicit values for stateful resource)",
                     rule=UpdateReplacePolicyDeletionPolicyOnStatefulResourceTypes(),
                     path=deque([]),
                     validator="required",
diff --git a/test/unit/rules/resources/test_dependson.py b/test/unit/rules/resources/test_dependson.py
index d4aaec466c..73c2fd5e67 100644
--- a/test/unit/rules/resources/test_dependson.py
+++ b/test/unit/rules/resources/test_dependson.py
@@ -76,13 +76,11 @@ def template():
             deque([]),
             [
                 ValidationError(
-                    (
-                        "'Foo' is not one of ['ParentBucket', "
-                        "'ChildBucket', "
-                        "'ParentBucketWithGoodCondition', "
-                        "'ParentBucketWithBadCondition', "
-                        "'ChildBucketWithBadCondition', 'ToMySelf']"
-                    ),
+                    "'Foo' is not one of ['ParentBucket', "
+                    "'ChildBucket', "
+                    "'ParentBucketWithGoodCondition', "
+                    "'ParentBucketWithBadCondition', "
+                    "'ChildBucketWithBadCondition', 'ToMySelf']",
                 )
             ],
         ),
@@ -104,12 +102,10 @@ def template():
             deque(["Resources", "ChildBucket", "DependsOn"]),
             [
                 ValidationError(
-                    (
-                        "'Foo' is not one of ['ParentBucket', "
-                        "'ParentBucketWithGoodCondition', "
-                        "'ParentBucketWithBadCondition', "
-                        "'ChildBucketWithBadCondition', 'ToMySelf']"
-                    ),
+                    "'Foo' is not one of ['ParentBucket', "
+                    "'ParentBucketWithGoodCondition', "
+                    "'ParentBucketWithBadCondition', "
+                    "'ChildBucketWithBadCondition', 'ToMySelf']",
                 )
             ],
         ),
@@ -119,10 +115,8 @@ def template():
             deque(["Resources", "ChildBucketWithBadCondition", "DependsOn"]),
             [
                 ValidationError(
-                    (
-                        "'ParentBucketWithBadCondition' will not exist when condition "
-                        "'IsUsEast1' is False"
-                    ),
+                    "'ParentBucketWithBadCondition' will not exist when condition "
+                    "'IsUsEast1' is False",
                 )
             ],
         ),
@@ -132,18 +126,15 @@ def template():
             deque(["Resources", "ToMySelf", "DependsOn"]),
             [
                 ValidationError(
-                    (
-                        "'ToMySelf' is not one of ['ParentBucket', 'ChildBucket', "
-                        "'ParentBucketWithGoodCondition', "
-                        "'ParentBucketWithBadCondition', 'ChildBucketWithBadCondition']"
-                    ),
+                    "'ToMySelf' is not one of ['ParentBucket', 'ChildBucket', "
+                    "'ParentBucketWithGoodCondition', "
+                    "'ParentBucketWithBadCondition', 'ChildBucketWithBadCondition']",
                 )
             ],
         ),
     ],
 )
 def test_validate(name, instance, path, expected, rule, validator):
-
     validator = validator.evolve(context=validator.context.evolve(path=Path(path)))
     errs = list(rule.validate(validator, False, instance, {}))
 
diff --git a/test/unit/rules/resources/test_dependson_obsolete.py b/test/unit/rules/resources/test_dependson_obsolete.py
index ccc0c777da..e7d7a15c26 100644
--- a/test/unit/rules/resources/test_dependson_obsolete.py
+++ b/test/unit/rules/resources/test_dependson_obsolete.py
@@ -63,11 +63,9 @@ def path():
             "Parent1Bucket",
             [
                 ValidationError(
-                    (
-                        "'Parent1Bucket' dependency already "
-                        "enforced by a 'Ref' at "
-                        "'Resources/ChildBucket/Properties/BucketName'"
-                    ),
+                    "'Parent1Bucket' dependency already "
+                    "enforced by a 'Ref' at "
+                    "'Resources/ChildBucket/Properties/BucketName'",
                 )
             ],
         ),
@@ -90,7 +88,6 @@ def test_validate(name, instance, expected, rule, validator):
     ],
 )
 def test_validate_no_cfn_graph(name, instance, expected, rule, validator):
-
     validator.cfn.graph = None
     errs = list(rule.validate(validator, False, instance, {}))
 
diff --git a/test/unit/rules/resources/test_previous_generation_instance_type.py b/test/unit/rules/resources/test_previous_generation_instance_type.py
index 53f6cf82f0..83b9da974c 100644
--- a/test/unit/rules/resources/test_previous_generation_instance_type.py
+++ b/test/unit/rules/resources/test_previous_generation_instance_type.py
@@ -5,8 +5,8 @@
 
 from test.unit.rules import BaseRuleTestCase
 
-from cfnlint.rules.resources.PreviousGenerationInstanceType import (
-    PreviousGenerationInstanceType,  # pylint: disable=E0401
+from cfnlint.rules.resources.PreviousGenerationInstanceType import (  # pylint: disable=E0401
+    PreviousGenerationInstanceType,
 )
 
 
diff --git a/test/unit/rules/resources/test_retentionperiod.py b/test/unit/rules/resources/test_retentionperiod.py
index 024743fe38..f3dba8c881 100644
--- a/test/unit/rules/resources/test_retentionperiod.py
+++ b/test/unit/rules/resources/test_retentionperiod.py
@@ -61,12 +61,10 @@ def path():
             {},
             [
                 ValidationError(
-                    (
-                        "'MessageRetentionPeriod' is a required property (The "
-                        "default retention period will delete the data after "
-                        "a pre-defined time. Set an explicit values to avoid "
-                        "data loss on resource)"
-                    ),
+                    "'MessageRetentionPeriod' is a required property (The "
+                    "default retention period will delete the data after "
+                    "a pre-defined time. Set an explicit values to avoid "
+                    "data loss on resource)",
                     rule=RetentionPeriodOnResourceTypesWithAutoExpiringContent(),
                     schema_path=deque(["required"]),
                     validator="required",
diff --git a/test/unit/rules/resources/test_retentionperiod_rds.py b/test/unit/rules/resources/test_retentionperiod_rds.py
index 85e5d6f486..b2d1fffb6f 100644
--- a/test/unit/rules/resources/test_retentionperiod_rds.py
+++ b/test/unit/rules/resources/test_retentionperiod_rds.py
@@ -59,12 +59,10 @@ def path():
             },
             [
                 ValidationError(
-                    (
-                        "'BackupRetentionPeriod' is a required property (The "
-                        "default retention period will delete the data after "
-                        "a pre-defined time. Set an explicit values to avoid "
-                        "data loss on resource)"
-                    ),
+                    "'BackupRetentionPeriod' is a required property (The "
+                    "default retention period will delete the data after "
+                    "a pre-defined time. Set an explicit values to avoid "
+                    "data loss on resource)",
                     rule=RetentionPeriodOnResourceTypesWithAutoExpiringContent(),
                     schema_path=deque(["then", "required"]),
                     validator="required",
diff --git a/test/unit/rules/resources/test_serverless_transform.py b/test/unit/rules/resources/test_serverless_transform.py
index 418e3fef25..2b011e1008 100644
--- a/test/unit/rules/resources/test_serverless_transform.py
+++ b/test/unit/rules/resources/test_serverless_transform.py
@@ -44,11 +44,9 @@ def rule():
             {},
             [
                 ValidationError(
-                    (
-                        "'AWS::Serverless::Function' type used "
-                        "without the serverless transform "
-                        "'AWS::Serverless-2016-10-31'"
-                    ),
+                    "'AWS::Serverless::Function' type used "
+                    "without the serverless transform "
+                    "'AWS::Serverless-2016-10-31'",
                     rule=ServerlessTransform(),
                 )
             ],
diff --git a/test/unit/rules/templates/test_description.py b/test/unit/rules/templates/test_description.py
index b096dd15d4..398be3a4fc 100644
--- a/test/unit/rules/templates/test_description.py
+++ b/test/unit/rules/templates/test_description.py
@@ -30,7 +30,7 @@ def rule():
             {},
             [
                 ValidationError(
-                    ("{} is not of type 'string'"),
+                    "{} is not of type 'string'",
                     rule=Description(),
                     schema_path=deque(["type"]),
                     validator="type",
diff --git a/test/unit/rules/templates/test_limitsize_description.py b/test/unit/rules/templates/test_limitsize_description.py
index d7f2331310..1dca2e40fe 100644
--- a/test/unit/rules/templates/test_limitsize_description.py
+++ b/test/unit/rules/templates/test_limitsize_description.py
@@ -41,7 +41,7 @@ def rule():
             None,
             [
                 ValidationError(
-                    ("expected maximum length: 3, found: 6"),
+                    "expected maximum length: 3, found: 6",
                 )
             ],
         ),
@@ -59,7 +59,7 @@ def rule():
             [ValidationError("Bad")],
             [
                 ValidationError(
-                    ("Bad"),
+                    "Bad",
                 )
             ],
         ),
diff --git a/test/unit/rules/templates/test_limitsize_description_approaching.py b/test/unit/rules/templates/test_limitsize_description_approaching.py
index 5e30e742d1..88ee40cf1d 100644
--- a/test/unit/rules/templates/test_limitsize_description_approaching.py
+++ b/test/unit/rules/templates/test_limitsize_description_approaching.py
@@ -30,7 +30,7 @@ def rule():
             "a" * 19,
             [
                 ValidationError(
-                    f"'{'a'*19}' is approaching the max length of 20",
+                    f"'{'a' * 19}' is approaching the max length of 20",
                     rule=ApproachingLimitDescription(),
                 )
             ],