-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add sub function #171
base: main
Are you sure you want to change the base?
Conversation
…aster-sam into feat/getatt-intrinsic-function
…ter-sam into feat/join-intrinsic-function
faster_sam/cloudformation.py
Outdated
for match in matches: | ||
if match in os.environ: | ||
env_var = os.environ[match] | ||
return string.replace(f"${{{match}}}", env_var) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dessa maneira o código não vai sempre retornar após encontrar o primeiro match no ambiente?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrigido!
… into feat/add-sub-function
faster_sam/cloudformation.py
Outdated
|
||
pattern = r"\${(.*?)}" | ||
|
||
def replace(string: str, matches: List[Any]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acho que vale a pena tirar essa função daqui e adicionar um teste unitário, se alguém alterar ela e adicionar um bug pode passar despercebido já que ela é testado só pela função acima dela.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrigido!
Contain
Details