From 7bd4a684b243c9bd61d015ef4a4ce651a93bbc01 Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Wed, 9 Aug 2023 22:22:39 +0800 Subject: [PATCH] Fix E721 Do not compare types, use `isinstance()` --- graphene_django/management/commands/graphql_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphene_django/management/commands/graphql_schema.py b/graphene_django/management/commands/graphql_schema.py index 16b49d20..25972b88 100644 --- a/graphene_django/management/commands/graphql_schema.py +++ b/graphene_django/management/commands/graphql_schema.py @@ -83,7 +83,7 @@ def get_schema(self, schema, out, indent): def handle(self, *args, **options): options_schema = options.get("schema") - if options_schema and type(options_schema) is str: + if options_schema and isinstance(options_schema, str): module_str, schema_name = options_schema.rsplit(".", 1) mod = importlib.import_module(module_str) schema = getattr(mod, schema_name)