Skip to content

Commit

Permalink
Correct __iter__ typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
esoma committed Dec 28, 2023
1 parent a8b1bdb commit a7b051f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
15 changes: 8 additions & 7 deletions codegen/templates/_emath.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ from emath._podtyping import U64
# python
import ctypes
from typing import Any
from typing import Iterator
from typing import SupportsFloat
from typing import SupportsInt
from typing import final
Expand Down Expand Up @@ -78,7 +79,7 @@ class {{ type }}:
def __init__(self, x: Number, y: Number, z: Number, w: Number, /): ...
{% endif %}

def __iter__(self) -> {{ component_type }}: ...
def __iter__(self) -> Iterator[{{ component_type }}]: ...
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
Expand Down Expand Up @@ -220,7 +221,7 @@ class {{ type }}Array:
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
def __iter__(self) -> {{ type }}: ...
def __iter__(self) -> Iterator[{{ type }}]: ...
@overload
def __getitem__(self, index: int) -> {{ type }}: ...
@overload
Expand Down Expand Up @@ -287,7 +288,7 @@ class {{ type }}:
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
def __iter__(self) -> {{ column_type }}: ...
def __iter__(self) -> Iterator[{{ column_type }}]: ...
def __getitem__(self) -> {{ column_type }}: ...
def __eq__(self, other: Any) -> _bool: ...
def __ne__(self, other: Any) -> _bool: ...
Expand Down Expand Up @@ -399,7 +400,7 @@ class {{ type }}Array:
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
def __iter__(self) -> {{ type }}: ...
def __iter__(self) -> Iterator[{{ type }}]: ...
@overload
def __getitem__(self, index: int) -> {{ type }}: ...
@overload
Expand Down Expand Up @@ -449,7 +450,7 @@ class {{ type }}:
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
def __iter__(self) -> float: ...
def __iter__(self) -> Iterator[float]: ...
def __getitem__(self) -> float: ...
def __eq__(self, other: Any) -> _bool: ...
def __ne__(self, other: Any) -> _bool: ...
Expand Down Expand Up @@ -534,7 +535,7 @@ class {{ type }}Array:
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
def __iter__(self) -> {{ type }}: ...
def __iter__(self) -> Iterator[{{ type }}]: ...
@overload
def __getitem__(self, index: int) -> {{ type }}: ...
@overload
Expand Down Expand Up @@ -585,7 +586,7 @@ class {{ type }}Array:
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __len__(self) -> int: ...
def __iter__(self) -> {{ pod_type }}: ...
def __iter__(self) -> Iterator[{{ pod_type }}]: ...
@overload
def __getitem__(self, index: int) -> {{ pod_type }}: ...
@overload
Expand Down
1 change: 1 addition & 0 deletions src/emath/_emath.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ from emath._podtyping import U64
# python
import ctypes
from typing import Any
from typing import Iterator
from typing import SupportsFloat
from typing import SupportsInt
from typing import final
Expand Down

0 comments on commit a7b051f

Please sign in to comment.