@@ -126,12 +126,12 @@ def pages(self) -> int:
126126
127127 @property
128128 def has_prev (self ) -> bool :
129- """`` True` ` if this is not the first page."""
129+ """`True` if this is not the first page."""
130130 return self .page > 1
131131
132132 @property
133133 def prev_num (self ) -> t .Optional [int ]:
134- """The previous page number, or `` None` ` if this is the first page."""
134+ """The previous page number, or `None` if this is the first page."""
135135 if not self .has_prev :
136136 return None
137137
@@ -140,9 +140,8 @@ def prev_num(self) -> t.Optional[int]:
140140 def prev (self , * , error_out : bool = False ) -> "PaginatorBase" :
141141 """Query the pagination object for the previous page.
142142
143- :param error_out: Abort with a ``404 Not Found`` error if no items are returned
144- and ``page`` is not 1, or if ``page`` or ``per_page`` is less than 1, or if
145- either are not ints.
143+ :param error_out: Raise `404 Not Found` error if no items are returned
144+ and `page` is not 1, or if `page` or `per_page` is less than 1.
146145 """
147146 init_kwargs = self ._get_init_kwargs ()
148147 init_kwargs .update (
@@ -157,19 +156,24 @@ def prev(self, *, error_out: bool = False) -> "PaginatorBase":
157156
158157 @property
159158 def has_next (self ) -> bool :
160- """`` True` ` if this is not the last page."""
159+ """`True` if this is not the last page."""
161160 return self .page < self .pages
162161
163162 @property
164163 def next_num (self ) -> t .Optional [int ]:
165- """The next page number, or `` None` ` if this is the last page."""
164+ """The next page number, or `None` if this is the last page."""
166165 if not self .has_next :
167166 return None
168167
169168 return self .page + 1
170169
171170 def next (self , * , error_out : bool = False ) -> "PaginatorBase" :
172- """ """
171+ """
172+ Query the Pagination object for the next page.
173+
174+ :param error_out: Raise `404 Not Found` error if no items are returned
175+ and `page` is not 1, or if `page` or `per_page` is less than 1.
176+ """
173177 init_kwargs = self ._get_init_kwargs ()
174178 init_kwargs .update (
175179 page = self .page + 1 ,
@@ -190,15 +194,15 @@ def iter_pages(
190194 right_current : int = 4 ,
191195 right_edge : int = 2 ,
192196 ) -> t .Iterator [t .Optional [int ]]:
193- """Yield page numbers for a pagination widget. Skipped pages between the edges
194- and middle are represented by a ``None``.
197+ """
198+ Yield page numbers for a pagination widget.
199+ A None represents skipped pages between the edges and middle.
195200
196201 For example, if there are 20 pages and the current page is 7, the following
197202 values are yielded.
198203
199- .. code-block:: python
200-
201- 1, 2, None, 5, 6, 7, 8, 9, 10, 11, None, 19, 20
204+ For example:
205+ 1, 2, None, 5, 6, 7, 8, 9, 10, 11, None, 19, 20
202206
203207 :param left_edge: How many pages to show from the first page.
204208 :param left_current: How many pages to show left of the current page.
0 commit comments