Skip to content
Closed
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
4 changes: 2 additions & 2 deletions airflow/providers/slack/operators/slack_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ def execute(self, context: Context) -> None:
username=self.username,
icon_emoji=self.icon_emoji,
icon_url=self.icon_url,
# Unused Parameters, if not None than warn user
link_names=self.link_names,
# Unused Parameters, warn user if not None
**({"link_names": self.link_names} if self.link_names else {}),
Comment on lines +172 to +173

@hussein-awala hussein-awala Jul 28, 2023

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

could you add a unit test to ensure that the argument is not provided when it's False?

Comment on lines +172 to +173

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Unused Parameters, warn user if not None
**({"link_names": self.link_names} if self.link_names else {}),

AFAIK I mark this value as not used for about I year, so we could just remove provide it in to the hook.

)