We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4f45ba commit b4fc6aeCopy full SHA for b4fc6ae
scratchattach/editor/commons.py
@@ -141,16 +141,5 @@ def get_name_nofldr(name: str) -> str:
141
else:
142
return name[len(fldr) + 2:]
143
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)
+Singleton = Enum
153
154
- @classmethod
155
- def get_instance(cls):
156
- return next(iter(cls))
0 commit comments