Skip to content

Commit

Permalink
Resolve Generator -> Iterator PYI058 check
Browse files Browse the repository at this point in the history
  • Loading branch information
bboe committed Apr 12, 2024
1 parent bd0a294 commit 8d72edd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions praw/models/reddit/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import TYPE_CHECKING, Any, Generator
from typing import TYPE_CHECKING, Any

from ...const import API_PATH
from ...exceptions import ClientException
Expand All @@ -14,6 +14,8 @@
from .subreddit import Subreddit

if TYPE_CHECKING: # pragma: no cover
from collections.abc import Iterator

import praw.models


Expand Down Expand Up @@ -489,7 +491,7 @@ def __init__(
"include_links": True,
}

def __iter__(self) -> Generator[Any, None, None]:
def __iter__(self) -> Iterator:
"""Provide a way to iterate over the posts in this :class:`.Collection`.
Example usage:
Expand Down

0 comments on commit 8d72edd

Please sign in to comment.