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

Fix #310 / #307 #311

Merged
merged 4 commits into from
Jun 30, 2021
Merged

Fix #310 / #307 #311

merged 4 commits into from
Jun 30, 2021

Conversation

mrfroggg
Copy link
Contributor

No description provided.

@mrfroggg
Copy link
Contributor Author

Dict merge will overwrite duplicate keys with last element:

a = {'a': 1, 'b': 2, 'c': 3}
b = {'c': 33, 'd': 44}
{**a, **b}
Out[4]: {'a': 1, 'b': 2, 'c': 33, 'd': 44}

@ferozsalam
Copy link
Collaborator

As we have Python 3.9 in the project, it might be neater to write this like:

template_values = self.match | self.rule

And then use the template_values where required.

@mrfroggg
Copy link
Contributor Author

As we have Python 3.9 in the project, it might be neater to write this like:

template_values = self.match | self.rule

And then use the template_values where required.

Oh, I never used | before, I'll update my PR!

@mrfroggg
Copy link
Contributor Author

Updated the PR and added test for alert_text_jinja

Copy link
Owner

@jertel jertel left a comment

Choose a reason for hiding this comment

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

Nice work, thank you!

@jertel jertel merged commit c4487a4 into jertel:master Jun 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants