Skip to content

Commit

Permalink
Patch: Fix spacing in subject line (#36)
Browse files Browse the repository at this point in the history
* Fix split of class name to not include preceding space

* Remove extra space from subject line
  • Loading branch information
rjulian committed Aug 16, 2020
1 parent 6498d4b commit 849d3b6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions reflex_core/aws_rule_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ def get_remediation_message_subject(self):
str: The subject to use in notifications.
"""
subject = self.__class__.__name__
subject_split = re.split(
"(?=(?<=[a-z])[A-Z])|(?=[A-Z](?=[a-z])|(?=^[A-Z]))", subject
)
subject_split = re.findall(r"[A-Z](?:[a-z]+|[A-Z]*(?=[A-Z]|$))", subject)
fixed_subject = " ".join(subject_split)
return f"The Reflex Rule {fixed_subject} was triggered."

Expand Down

0 comments on commit 849d3b6

Please sign in to comment.