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 0fd99c9 commit 807ae70Copy full SHA for 807ae70
graphene_mongo/registry.py
@@ -26,9 +26,9 @@ def register(self, cls):
26
27
def register_enum(self, cls):
28
from enum import EnumMeta
29
- assert type(cls) == EnumMeta, 'Only EnumMeta can be registered, received "{}"'.format(
30
- cls.__name__
31
- )
+ assert isinstance(
+ cls, EnumMeta
+ ), f'Only EnumMeta can be registered, received "{cls.__name__}"'
32
if not cls.__name__.endswith('Enum'):
33
name = cls.__name__ + 'Enum'
34
else:
0 commit comments