Skip to content

Commit 07c1da2

Browse files
committed
chore: wip
1 parent 33d3ce3 commit 07c1da2

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/array_api/cli/_main.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ def generate(body_module: dict[str, list[ast.stmt]], out_path: Path) -> None:
168168

169169
# Import `abc.abstractmethod`, `typing.Protocol` and `typing.runtime_checkable`
170170
out = ast.Module(body=[], type_ignores=[])
171-
out.body.append(ast.Expr(value=ast.Constant("Auto generated Protocol classes (Do not edit)")))
172-
out.body.append(
173-
ast.ImportFrom(
174-
module="abc",
175-
names=[ast.alias(name="abstractmethod")],
176-
level=0,
177-
),
178-
)
179171

180172
# Create Protocols with __call__, representing functions
181173
for submodule, body in body_module.items():
@@ -245,7 +237,8 @@ def generate(body_module: dict[str, list[ast.stmt]], out_path: Path) -> None:
245237

246238
text = ast.unparse(ast.fix_missing_locations(out))
247239
text = (
248-
"""from enum import Enum
240+
""""Auto generated Protocol classes (Do not edit)"
241+
from enum import Enum
249242
from abc import abstractmethod
250243
from collections.abc import Sequence
251244
from typing import (

0 commit comments

Comments
 (0)