Skip to content

Commit b339380

Browse files
committed
Use Generator instead of Iterator
1 parent 3c63582 commit b339380

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

stubs/fpdf2/fpdf/drawing.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import decimal
22
from _typeshed import Incomplete
33
from collections import OrderedDict
4-
from collections.abc import Callable, Generator, Iterator, Sequence
4+
from collections.abc import Callable, Generator, Sequence
55
from contextlib import contextmanager
66
from re import Pattern
77
from typing import Any, ClassVar, Literal, NamedTuple, TypeVar, overload
@@ -354,7 +354,7 @@ class PaintedPath:
354354
@clipping_path.setter
355355
def clipping_path(self, new_clipath) -> None: ...
356356
@contextmanager
357-
def transform_group(self, transform) -> Iterator[Self]: ...
357+
def transform_group(self, transform) -> Generator[Self]: ...
358358
def add_path_element(self, item, _copy: bool = True) -> None: ...
359359
def remove_last_path_element(self) -> None: ...
360360
def rectangle(self, x, y, w, h, rx: int = 0, ry: int = 0) -> Self: ...

stubs/google-cloud-ndb/google/cloud/ndb/client.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from _typeshed import Incomplete
2-
from collections.abc import Callable, Iterator
2+
from collections.abc import Callable, Generator
33
from contextlib import contextmanager
44
from typing import ClassVar
55

@@ -32,4 +32,4 @@ class Client:
3232
global_cache_policy: Callable[[key.Key], bool] | None = ...,
3333
global_cache_timeout_policy: Callable[[key.Key], int] | None = ...,
3434
legacy_data: bool = ...,
35-
) -> Iterator[context_module.Context]: ...
35+
) -> Generator[context_module.Context]: ...

stubs/pygit2/pygit2/utils.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import contextlib
22
import types
33
from _typeshed import StrOrBytesPath, StrPath
4-
from collections.abc import Iterator
4+
from collections.abc import Generator
55
from typing import Generic, TypeVar
66
from typing_extensions import TypeAlias
77

@@ -12,7 +12,7 @@ def to_bytes(s: _CDataBase | StrOrBytesPath | None, encoding: str = "utf-8", err
1212
def to_str(s: StrOrBytesPath) -> str: ...
1313
def ptr_to_bytes(ptr_cdata: _CDataBase) -> bytes: ...
1414
@contextlib.contextmanager
15-
def new_git_strarray() -> Iterator[_GitStrArray]: ...
15+
def new_git_strarray() -> Generator[_GitStrArray]: ...
1616
def strarray_to_strings(arr: _GitStrArray) -> list[str]: ...
1717

1818
# Actual type: _cffi_backend.__CDataOwn <cdata 'struct git_strarray *'>

stubs/pynput/pynput/keyboard/_base.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import contextlib
22
import enum
33
import sys
4-
from collections.abc import Callable, Iterable, Iterator
4+
from collections.abc import Callable, Generator, Iterable, Iterator
55
from typing import Any, ClassVar
66
from typing_extensions import Self
77

@@ -108,7 +108,7 @@ class Controller:
108108
def tap(self, key: str | Key | KeyCode) -> None: ...
109109
def touch(self, key: str | Key | KeyCode, is_press: bool) -> None: ...
110110
@contextlib.contextmanager
111-
def pressed(self, *args: str | Key | KeyCode) -> Iterator[None]: ...
111+
def pressed(self, *args: str | Key | KeyCode) -> Generator[None]: ...
112112
def type(self, string: str) -> None: ...
113113
@property
114114
def modifiers(self) -> contextlib.AbstractContextManager[Iterator[set[Key]]]: ...

stubs/tensorflow/tensorflow/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import abc
22
from _typeshed import Incomplete, Unused
33
from abc import ABC, ABCMeta, abstractmethod
44
from builtins import bool as _bool
5-
from collections.abc import Callable, Iterable, Iterator, Sequence
5+
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
66
from contextlib import contextmanager
77
from enum import Enum
88
from types import TracebackType
@@ -228,7 +228,7 @@ class Graph:
228228
def add_to_collection(self, name: str, value: object) -> None: ...
229229
def add_to_collections(self, names: Iterable[str] | str, value: object) -> None: ...
230230
@contextmanager
231-
def as_default(self) -> Iterator[Self]: ...
231+
def as_default(self) -> Generator[Self]: ...
232232
def finalize(self) -> None: ...
233233
def get_tensor_by_name(self, name: str) -> Tensor: ...
234234
def get_operation_by_name(self, name: str) -> Operation: ...

stubs/tensorflow/tensorflow/summary.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import abc
22
from _typeshed import Incomplete
3-
from collections.abc import Callable, Iterator
3+
from collections.abc import Callable, Generator
44
from contextlib import AbstractContextManager, contextmanager
55
from typing import Literal
66
from typing_extensions import Self
@@ -49,7 +49,7 @@ def image(
4949
description: str | None = None,
5050
) -> bool: ...
5151
@contextmanager
52-
def record_if(condition: bool | tf.Tensor | Callable[[], bool]) -> Iterator[None]: ...
52+
def record_if(condition: bool | tf.Tensor | Callable[[], bool]) -> Generator[None]: ...
5353
def scalar(name: str, data: float | tf.Tensor, step: int | tf.Tensor | None = None, description: str | None = None) -> bool: ...
5454
def should_record_summaries() -> bool: ...
5555
def text(name: str, data: str | tf.Tensor, step: int | tf.Tensor | None = None, description: str | None = None) -> bool: ...

0 commit comments

Comments
 (0)