diff --git a/strawberry/cli/commands/codegen.py b/strawberry/cli/commands/codegen.py index a6efd6fd01..2456292c1a 100644 --- a/strawberry/cli/commands/codegen.py +++ b/strawberry/cli/commands/codegen.py @@ -3,7 +3,7 @@ import functools import importlib import inspect -from typing import List, Optional, Type, TYPE_CHECKING +from typing import TYPE_CHECKING, List, Optional, Type import rich import typer @@ -146,7 +146,9 @@ def codegen( elif isinstance(p, TypeScriptPlugin): p.outfile_name = q.stem + ".ts" - code_generator = QueryCodegen(schema_symbol, plugins=plugins, console_plugin=console_plugin) + code_generator = QueryCodegen( + schema_symbol, plugins=plugins, console_plugin=console_plugin + ) code_generator.run(q.read_text()) console_plugin.after_all_finished() diff --git a/tests/codegen/test_query_codegen.py b/tests/codegen/test_query_codegen.py index 1fe7ecefe5..ccf7beecbb 100644 --- a/tests/codegen/test_query_codegen.py +++ b/tests/codegen/test_query_codegen.py @@ -6,7 +6,6 @@ from pathlib import Path from typing import Type -from unittest import mock import pytest from pytest_snapshot.plugin import Snapshot