|
16 | 16 | import re |
17 | 17 | import shutil |
18 | 18 | from contextlib import suppress |
19 | | -from dataclasses import field, dataclass |
| 19 | +from dataclasses import dataclass, field |
20 | 20 | from fileinput import FileInput |
21 | 21 | from pathlib import Path |
22 | | -from typing import List, Dict, Tuple |
| 22 | +from typing import Dict, List, Tuple |
23 | 23 |
|
24 | 24 | import jsii |
25 | | -from aws_cdk import IStackSynthesizer, DefaultStackSynthesizer, ISynthesisSession |
| 25 | +from aws_cdk import DefaultStackSynthesizer, IStackSynthesizer, ISynthesisSession |
26 | 26 |
|
27 | 27 | logger = logging.getLogger("cdk-helper") |
28 | 28 |
|
@@ -256,7 +256,7 @@ def save(self, asset_path_global: Path = None, asset_path_regional: Path = None) |
256 | 256 |
|
257 | 257 |
|
258 | 258 | @jsii.implements(IStackSynthesizer) |
259 | | -class SolutionStackSubstitions(DefaultStackSynthesizer): |
| 259 | +class SolutionStackSubstitutions(DefaultStackSynthesizer): |
260 | 260 | """Used to handle AWS Solutions template substitutions and sanitization""" |
261 | 261 |
|
262 | 262 | substitutions = None |
@@ -295,11 +295,11 @@ def synthesize(self, session: ISynthesisSession): |
295 | 295 |
|
296 | 296 | logger.info(f"solutions parameter substitution in {session.assembly.outdir} started") |
297 | 297 | for template in self._template_names(session): |
298 | | - logger.info(f"substutiting parameters in {str(template)}") |
| 298 | + logger.info(f"substituting parameters in {str(template)}") |
299 | 299 | with FileInput(template, inplace=True) as template_lines: |
300 | 300 | for line in template_lines: |
301 | | - # handle all template subsitutions in the line |
302 | | - for match in SolutionStackSubstitions.substitution_re.findall(line): |
| 301 | + # handle all template substitutions in the line |
| 302 | + for match in SolutionStackSubstitutions.substitution_re.findall(line): |
303 | 303 | placeholder = match.replace("%", "") |
304 | 304 | replacement = self._stack.node.try_get_context(placeholder) |
305 | 305 | if not replacement: |
|
0 commit comments