Skip to content

Commit b4fc6ae

Browse files
authored
Aktualisieren von commons.py
1 parent f4f45ba commit b4fc6ae

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

scratchattach/editor/commons.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,5 @@ def get_name_nofldr(name: str) -> str:
141141
else:
142142
return name[len(fldr) + 2:]
143143

144-
if TYPE_CHECKING:
145-
Singleton = Enum
146-
else:
147-
class Singleton(Enum):
148-
149-
def __new__(cls, val=0, *args, **kwargs):
150-
if cls is Singleton:
151-
raise TypeError("Singleton cannot be created directly.")
152-
return super().__new__(cls, val, *args, **kwargs)
144+
Singleton = Enum
153145

154-
@classmethod
155-
def get_instance(cls):
156-
return next(iter(cls))

0 commit comments

Comments
 (0)