Skip to content
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

Expand parameter overrides #7876

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace |= with .updates() to support older Python
  • Loading branch information
sigJoe committed Feb 10, 2025
commit 8b3782e07dde6c9225bdd9367bff5c322fb73444
4 changes: 2 additions & 2 deletions samcli/cli/types.py
Original file line number Diff line number Diff line change
@@ -136,14 +136,14 @@ def _normalize_parameters(self, values, param, ctx):
file_manager = FILE_MANAGER_MAPPER.get(filepath.suffix, None)
if not file_manager:
self.fail(f"{value} uses an unsupported extension", param, ctx)
parameters |= self._normalize_parameters(file_manager.read(filepath), param, ctx)
parameters.update(self._normalize_parameters(file_manager.read(filepath), param, ctx))
else:
# Legacy parameter matching
normalized_value = " " + value.strip()
for pattern in self.ordered_pattern_match:
groups = re.findall(pattern, normalized_value)
if groups:
parameters |= groups
parameters.update(groups)
break
else:
self.fail(