Skip to content

Commit

Permalink
Fix: Allow also Number in Backend Class-Names
Browse files Browse the repository at this point in the history
  • Loading branch information
andurin committed Oct 21, 2024
1 parent 91a5b83 commit 063c25f
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 063c25f

Please sign in to comment.