Skip to content
Merged
Changes from all commits
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
13 changes: 6 additions & 7 deletions samcli/lib/providers/sam_function_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,15 @@ def get(self, name: str) -> Optional[Function]:
if len(found_fs) > 1:
found_fs.sort(key=lambda f0: f0.full_path.lower())

LOG.warning(
"Multiple functions found with keyword %s! Function %s will be invoked! "
"If it's not the function you are going to invoke,"
"please choose one of them from below:",
name,
found_fs[0].full_path,
message = (
f"Multiple functions found with keyword {name}! Function {found_fs[0].full_path} will be "
f"invoked! If it's not the function you are going to invoke, please choose one of them from"
f" below:"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name,found_fs[0].full_path, Do we want to add these to the message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are already there
f"Multiple functions found with keyword <<<{name}!>>>> Function <<<<{found_fs[0].full_path}>>>> will be "

)
LOG.warning(Colored().yellow(message))

for found_f in found_fs:
LOG.warning(found_f.full_path)
LOG.warning(Colored().yellow(found_f.full_path))

resolved_function = found_fs[0]

Expand Down