Skip to content

Commit 6df3e16

Browse files
committed
Added docstrings and type hints for all main primitives and methods
1 parent 41b9698 commit 6df3e16

File tree

3 files changed

+262
-66
lines changed

3 files changed

+262
-66
lines changed

docs/ref/methods_and_combinators.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ can be used and manipulated as below.
145145
>>> string('A').optional('Oops').parse('')
146146
'Oops'
147147
148-
.. method:: map(fn)
148+
.. method:: map(map_function)
149149

150150
Returns a parser that transforms the produced value of the initial parser
151-
with ``fn``.
151+
with ``map_function``.
152152

153153
.. code:: python
154154
@@ -158,10 +158,10 @@ can be used and manipulated as below.
158158
This is the simplest way to convert parsed strings into the data types
159159
that you need. See also :meth:`combine` and :meth:`combine_dict` below.
160160

161-
.. method:: combine(fn)
161+
.. method:: combine(combine_fn)
162162

163163
Returns a parser that transforms the produced values of the initial parser
164-
with ``fn``, passing the arguments using ``*args`` syntax.
164+
with ``combine_fn``, passing the arguments using ``*args`` syntax.
165165

166166
Where the current parser produces an iterable of values, this can be a
167167
more convenient way to combine them than :meth:`~Parser.map`.

docs/ref/primitives.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ These are the lowest level building blocks for creating parsers.
196196

197197
.. function:: peek(parser)
198198

199-
Returns a lookahead parser that parse the input stream without consuming
199+
Returns a lookahead parser that parses the input stream without consuming
200200
chars.
201201

202202
.. code-block: python

0 commit comments

Comments
 (0)