Skip to content

Commit 552e697

Browse files
committed
Fix some pyflakes errors in the generated function stubs
1 parent abf68bf commit 552e697

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

generate_stubs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
library, e.g., for NumPy TypeVar('array') would be replaced with ndarray.
9191
"""
9292
93-
from typing import Any, List, Literal, Optional, Tuple, Union, TypeVar
93+
from dataclasses import dataclass
94+
from typing import Any, List, Literal, Optional, Sequence, Tuple, TypeVar, Union
9495
9596
array = TypeVar('array')
9697
device = TypeVar('device')
@@ -283,6 +284,7 @@ def {annotated_sig}:{doc}
283284
for module_name in modules:
284285
if module_name == 'linalg':
285286
f.write(f'\nfrom . import {module_name}\n')
287+
f.write(f"\n__all__ += ['linalg']\n")
286288
continue
287289
f.write(f"\nfrom .{module_name} import ")
288290
f.write(', '.join(modules[module_name]))

0 commit comments

Comments
 (0)