Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio committed Jan 22, 2025
1 parent 06a7667 commit cff68ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web_poet/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Any,
DefaultDict,
Dict,
Generator,
Iterable,
List,
Mapping,
Expand Down Expand Up @@ -391,7 +392,9 @@ def page_cls_for_item(
matcher = self._item_matchers.get(item_cls)
return self._match_url_for_page_object(url, matcher)

def top_rules_for_item(self, url: Union[_Url, str], item_cls: Type) -> List[Type]:
def top_rules_for_item(
self, url: Union[_Url, str], item_cls: Type
) -> Generator[ApplyRule, None, None]:
"""Iterates the top rules that apply for *url* and *item_cls*.
If multiple rules score the same, multiple rules are iterated. This may
Expand Down

0 comments on commit cff68ac

Please sign in to comment.