Skip to content

Commit

Permalink
Slightly improve converter docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Sep 23, 2022
1 parent 6a24cc4 commit 0378257
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pypdfium2/_helpers/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ def run(result, renderer_kws, *args, **kwargs):
Note:
* :meth:`.run` should be implemented as a :func:`staticmethod`.
* To make sure callers are notified of possible mistakes, the overriding function should never capture unrecognised arguments!
* If the implementation takes additional parameters, it is expected to define them on an explicit basis.
Unrecognised arguments should always be refused.
Parameters:
result (tuple):
Result of the :meth:`.PdfPage.render_base` call (ctypes array, colour format, size).
renderer_kws (dict):
Dictionary of keywords that were passed to :meth:`.PdfPage.render_base` by the caller. May be empty.
args (tuple):
Further positional arguments captured by the constructor, to be explicitly taken by the implementation (see the admonition above).
Further positional arguments to the converter, as captured by the constructor (see note above).
kwargs (dict):
Further keyword arguments captured by the constructor, to be explicitly taken by the implementation (see the admonition above).
Further keyword arguments to the converter, as captured by the constructor (see note above).
Returns:
typing.Any: The converted rendering result (implementation-specific).
"""
Expand All @@ -71,8 +72,7 @@ class any (BitmapConvBase):
A callable to translate a ctypes array to a different data type.
It could be a function, a class with constructor, or an instance of a class implementing ``__call__``.
Returns:
(typing.Any, ...):
The converted rendering result (implementation-specific), and additional information returned by :meth:`.PdfPage.render_base` (colour format, size).
(typing.Any, ...): The converted rendering result (implementation-specific), and additional information returned by :meth:`.PdfPage.render_base` (colour format, size).
"""

@staticmethod
Expand Down

0 comments on commit 0378257

Please sign in to comment.