Skip to content

Commit ddb2bcd

Browse files
committed
ORG-32418
1 parent a42a9f7 commit ddb2bcd

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/originpro/pe.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"""
66
# pylint: disable=C0103,C0301
77
from typing import Union
8+
from collections.abc import Generator
89
from .config import po, oext
910
from .utils import _LTTMPOUTSTR, active_obj
1011
from .base import BaseObject
@@ -89,15 +90,16 @@ def path(self):
8990
path = self.obj.Path
9091
return path if oext else path()
9192

92-
def pages(self, type_='') -> Union[WBook, MBook, GPage, IPage]:
93+
def pages(self, type_='') -> Generator[WBook, MBook, GPage, IPage]:
9394
"""
9495
All pages in folder.
9596
Parameters:
9697
type_ (str): Page type, can be 'w', 'm', 'g', 'i'
9798
Returns:
98-
Page Objects
99+
Page Objects Generator
99100
Examples:
100-
for wb in op.pages('w'):
101+
fld = op.active_folder()
102+
for wb in fld.pages('w'):
101103
for wks in wb:
102104
print(f'Worksheet {wks.lt_range()} has {wks.rows} rows')
103105
"""

0 commit comments

Comments
 (0)