Skip to content

Commit

Permalink
remove type params
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianCzajkowski committed Jul 30, 2024
1 parent 2ac1f7b commit a0908ac
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ariadne_codegen/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def generate_async_method_definition(
body: Optional[List[ast.stmt]] = None,
lineno: int = 1,
decorator_list: Optional[List[ast.expr]] = None,
type_params: Optional[List[ast.type_param]] = None,
) -> ast.AsyncFunctionDef:
"""Generate async function."""
return ast.AsyncFunctionDef(
Expand All @@ -100,15 +99,14 @@ def generate_async_method_definition(
decorator_list=decorator_list if decorator_list else [],
returns=return_type,
lineno=lineno,
type_params=type_params if type_params else [],
type_params=[],
)


def generate_class_def(
name: str,
base_names: Optional[List[str]] = None,
body: Optional[List[ast.stmt]] = None,
type_params: Optional[List[ast.type_param]] = None,
) -> ast.ClassDef:
"""Generate class definition."""
bases = cast(
Expand All @@ -120,7 +118,7 @@ def generate_class_def(
keywords=[],
body=body if body else [],
decorator_list=[],
type_params=type_params if type_params else [],
type_params=[],
)


Expand Down Expand Up @@ -352,7 +350,6 @@ def generate_method_definition(
body: Optional[List[ast.stmt]] = None,
lineno: int = 1,
decorator_list: Optional[List[ast.expr]] = None,
type_params: Optional[List[ast.type_param]] = None,
) -> ast.FunctionDef:
return ast.FunctionDef(
name=name,
Expand All @@ -361,7 +358,7 @@ def generate_method_definition(
decorator_list=decorator_list if decorator_list else [],
returns=return_type,
lineno=lineno,
type_params=type_params if type_params else [],
type_params=[],
)


Expand Down

0 comments on commit a0908ac

Please sign in to comment.