summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBenson Muite <bkmgit@users.noreply.github.com>2023-08-01 17:53:03 +0300
committerGitHub <noreply@github.com>2023-08-01 17:53:03 +0300
commitce7ec2b981dd6207f110bdf23cf3612b8d597158 (patch)
treee8fac3fb97f85f9645c86ddfe0e8234ec871c02e /lib
parent9c090170941e00a6c6265e3a6999ca240fb73052 (diff)
parentfe4f26c58ec4820dc8aa5a2e193e567bff310b03 (diff)
Merge pull request #2441 from inkstitch/bkmgit/remove-stringcase-dependency
Drop stringcase dependency
Diffstat (limited to 'lib')
-rw-r--r--lib/extensions/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/extensions/base.py b/lib/extensions/base.py
index 3c16a11c..e0bf4131 100644
--- a/lib/extensions/base.py
+++ b/lib/extensions/base.py
@@ -7,7 +7,6 @@ import os
import inkex
from lxml.etree import Comment
-from stringcase import snakecase
from ..commands import is_command, layer_commands
from ..elements import EmbroideryElement, nodes_to_elements
@@ -32,7 +31,9 @@ class InkstitchExtension(inkex.EffectExtension):
@classmethod
def name(cls):
- return snakecase(cls.__name__)
+ # Convert CamelCase to snake_case
+ return cls.__name__[0].lower() + ''.join([x if x.islower() else f'_{x.lower()}'
+ for x in cls.__name__[1:]])
def hide_all_layers(self):
for g in self.document.getroot().findall(SVG_GROUP_TAG):