Commit 77d83d1
committed
chore: consolidate property lists, mark unused methods, document validator
Three cleanup items from the review:
#5: _ARTIFACT_PATH_PROPERTIES in template.py was a hand-maintained set
of property names that duplicated PACKAGEABLE_RESOURCE_ARTIFACT_PROPERTIES
in models.py. Replaced with a frozenset derived from the canonical source
so the two cannot drift.
#6: SamTranslatorWrapper.get_original_template() and
get_dynamic_artifact_properties() are only called in tests — callers
now consume LanguageExtensionResult directly. Added a TODO comment
rather than deleting (would require removing ~20 test methods across
3 files — not worth the churn in this PR).
#7: Documented that get_translated_template_if_valid mutates
self.sam_template when language extensions are present. The mutation
is idempotent (re-expanding an already-expanded template is a no-op)
so double-calling is safe, but the comment makes the contract explicit.1 parent 7c9e94b commit 77d83d1
3 files changed
Lines changed: 15 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
46 | 39 | | |
47 | 40 | | |
48 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
0 commit comments