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 237f342 commit d2df96eCopy full SHA for d2df96e
pylabrobot/machines/backend.py
@@ -1,5 +1,6 @@
1
+import inspect
2
import weakref
-from abc import ABC, ABCMeta, abstractmethod
3
+from abc import ABC, abstractmethod
4
5
from pylabrobot.utils.object_parsing import find_subclass
6
@@ -29,7 +30,7 @@ def deserialize(cls, data: dict):
29
30
subclass = find_subclass(class_name, cls=cls)
31
if subclass is None:
32
raise ValueError(f'Could not find subclass with name "{data["type"]}"')
- if issubclass(subclass, ABCMeta):
33
+ if inspect.isabstract(subclass):
34
raise ValueError(f'Subclass with name "{data["type"]}" is abstract')
35
assert issubclass(subclass, cls)
36
return subclass(**data)
0 commit comments