cfn-check 0.6.0__tar.gz → 0.6.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cfn-check might be problematic. Click here for more details.

Files changed (44) hide show
  1. {cfn_check-0.6.0 → cfn_check-0.6.2}/PKG-INFO +1 -1
  2. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/rendering/renderer.py +6 -29
  3. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check.egg-info/PKG-INFO +1 -1
  4. {cfn_check-0.6.0 → cfn_check-0.6.2}/pyproject.toml +1 -1
  5. {cfn_check-0.6.0 → cfn_check-0.6.2}/LICENSE +0 -0
  6. {cfn_check-0.6.0 → cfn_check-0.6.2}/README.md +0 -0
  7. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/__init__.py +0 -0
  8. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/cli/__init__.py +0 -0
  9. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/cli/render.py +0 -0
  10. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/cli/root.py +0 -0
  11. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/cli/utils/__init__.py +0 -0
  12. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/cli/utils/attributes.py +0 -0
  13. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/cli/utils/files.py +0 -0
  14. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/cli/validate.py +0 -0
  15. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/collection/__init__.py +0 -0
  16. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/collection/collection.py +0 -0
  17. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/__init__.py +0 -0
  18. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/errors.py +0 -0
  19. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/evaluator.py +0 -0
  20. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/parsing/__init__.py +0 -0
  21. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/parsing/query_parser.py +0 -0
  22. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/parsing/token.py +0 -0
  23. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/parsing/token_type.py +0 -0
  24. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/evaluation/validate.py +0 -0
  25. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/logging/__init__.py +0 -0
  26. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/logging/models.py +0 -0
  27. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/rendering/__init__.py +0 -0
  28. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/rendering/utils.py +0 -0
  29. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/rules/__init__.py +0 -0
  30. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/rules/rule.py +0 -0
  31. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/shared/__init__.py +0 -0
  32. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/shared/types.py +0 -0
  33. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/validation/__init__.py +0 -0
  34. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check/validation/validator.py +0 -0
  35. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check.egg-info/SOURCES.txt +0 -0
  36. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check.egg-info/dependency_links.txt +0 -0
  37. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check.egg-info/entry_points.txt +0 -0
  38. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check.egg-info/requires.txt +0 -0
  39. {cfn_check-0.6.0 → cfn_check-0.6.2}/cfn_check.egg-info/top_level.txt +0 -0
  40. {cfn_check-0.6.0 → cfn_check-0.6.2}/example/multitag.py +0 -0
  41. {cfn_check-0.6.0 → cfn_check-0.6.2}/example/pydantic_rules.py +0 -0
  42. {cfn_check-0.6.0 → cfn_check-0.6.2}/example/renderer_test.py +0 -0
  43. {cfn_check-0.6.0 → cfn_check-0.6.2}/example/rules.py +0 -0
  44. {cfn_check-0.6.0 → cfn_check-0.6.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfn-check
3
- Version: 0.6.0
3
+ Version: 0.6.2
4
4
  Summary: Validate Cloud Formation
5
5
  Author-email: Ada Lundhe <adalundhe@lundhe.audio>
6
6
  License: MIT License
@@ -165,7 +165,9 @@ class Renderer:
165
165
  def _assemble_parameters(self, resources: YamlObject):
166
166
  params: dict[str, Data] = resources.get("Parameters", {})
167
167
  for param_name, param in params.items():
168
- if default := param.get("Default"):
168
+ if isinstance(param, CommentedMap) and (
169
+ default := param.get("Default")
170
+ ):
169
171
  self._parameters_with_defaults[param_name] = default
170
172
 
171
173
  def _resolve_tagged(self, root: CommentedMap, node: TaggedScalar | CommentedMap | CommentedSeq):
@@ -504,6 +506,8 @@ class Renderer:
504
506
  ):
505
507
  condition_key = self._resolve_subtree(root, condition_key)
506
508
 
509
+ result = self._resolve_subtree(root, self._conditions.get(condition_key))
510
+
507
511
  true_result = source[1]
508
512
  if isinstance(
509
513
  true_result,
@@ -512,35 +516,8 @@ class Renderer:
512
516
  true_result = self._resolve_subtree(root, true_result)
513
517
 
514
518
  false_result = source[2]
515
- if isinstance(
516
- true_result,
517
- (CommentedMap, CommentedSeq, TaggedScalar),
518
- ):
519
- false_result = self._resolve_subtree(root, false_result)
520
-
521
- if (
522
- condition := self._conditions.get(condition_key)
523
- ) and isinstance(
524
- condition,
525
- (CommentedMap, CommentedSeq, TaggedScalar)
526
- ) and (
527
- result := self._resolve_subtree(root, condition)
528
- ) and isinstance(
529
- result,
530
- bool,
531
- ):
532
-
533
- return true_result if result else False
534
-
535
- elif (
536
- condition := self._conditions.get(condition_key)
537
- ) and isinstance(
538
- condition,
539
- bool,
540
- ):
541
- return true_result if condition else False
542
519
 
543
- return source
520
+ return true_result if isinstance(result, bool) and result else false_result
544
521
 
545
522
  def _resolve_condition(
546
523
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfn-check
3
- Version: 0.6.0
3
+ Version: 0.6.2
4
4
  Summary: Validate Cloud Formation
5
5
  Author-email: Ada Lundhe <adalundhe@lundhe.audio>
6
6
  License: MIT License
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "cfn-check"
9
- version = "0.6.0"
9
+ version = "0.6.2"
10
10
  requires-python = ">=3.12"
11
11
  description = "Validate Cloud Formation"
12
12
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes