Skip to content

Commit

Permalink
Merge pull request #295 from SigmaHQ/allow_num_in_classnames
Browse files Browse the repository at this point in the history
Fix: Allow also Number in Backend Class-Names
  • Loading branch information
thomaspatzke authored Oct 21, 2024
2 parents f178cb2 + 063c25f commit fc60de2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sigma/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def removesuffix(base: str, suffix: str) -> str:
identifier = removesuffix(identifier, "Backend")
identifier = removesuffix(identifier, "backend")
identifier = removesuffix(identifier, "_")
words = re.findall(r"[A-Z](?:[A-Z]*(?![a-z])|[a-z]*)", identifier)
words = re.findall(r"[A-Z](?:[A-Z0-9]*(?![a-z0-9])|[a-z0-9]*)", identifier)
if len(words) == 0:
return identifier.lower()
rebuilt_identifier = "_".join(words).lower()
Expand Down

0 comments on commit fc60de2

Please sign in to comment.