Skip to content

Commit 3dd34eb

Browse files
committed
Update annotation in documentation
1 parent cf4c4ec commit 3dd34eb

11 files changed

Lines changed: 94 additions & 92 deletions

File tree

Doc/library/code.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ build applications which provide an interactive interpreter prompt.
2323
``'__console__'`` and key ``'__doc__'`` set to ``None``.
2424

2525

26-
.. class:: InteractiveConsole(locals=None, filename="<console>", local_exit=False)
26+
.. class:: InteractiveConsole(locals=None, filename="<console>", *, local_exit=False)
2727

2828
Closely emulate the behavior of the interactive Python interpreter. This class
2929
builds on :class:`InteractiveInterpreter` and adds prompting using the familiar
@@ -112,7 +112,7 @@ Interactive Interpreter Objects
112112
with it.
113113

114114

115-
.. method:: InteractiveInterpreter.showsyntaxerror(filename=None)
115+
.. method:: InteractiveInterpreter.showsyntaxerror(filename=None, **kwargs)
116116

117117
Display the syntax error that just occurred. This does not display a stack
118118
trace because there isn't one for syntax errors. If *filename* is given, it is
@@ -166,7 +166,7 @@ interpreter objects as well as the following additions.
166166
Print an exit message when exiting.
167167

168168

169-
.. method:: InteractiveConsole.push(line)
169+
.. method:: InteractiveConsole.push(line, filename=None, _symbol="single")
170170

171171
Push a line of source text to the interpreter. The line should not have a
172172
trailing newline; it may have internal newlines. The line is appended to a

Doc/library/codecs.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ any codec:
5555

5656
The full details for each codec can also be looked up directly:
5757

58-
.. function:: lookup(encoding)
58+
.. function:: lookup(encoding, /)
5959

6060
Looks up the codec info in the Python codec registry and returns a
6161
:class:`CodecInfo` object as defined below.
@@ -65,7 +65,7 @@ The full details for each codec can also be looked up directly:
6565
found, a :exc:`LookupError` is raised. Otherwise, the :class:`CodecInfo` object
6666
is stored in the cache and returned to the caller.
6767

68-
.. class:: CodecInfo(encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None)
68+
.. class:: CodecInfo(encode, decode, streamreader=None, streamwriter=None, incrementalencoder=None, incrementaldecoder=None, name=None, *, _is_text_encoding=None)
6969

7070
Codec details when looking up the codec registry. The constructor
7171
arguments are stored in attributes of the same name:
@@ -156,7 +156,7 @@ these additional functions which use :func:`lookup` for the codec lookup:
156156
Custom codecs are made available by registering a suitable codec search
157157
function:
158158

159-
.. function:: register(search_function)
159+
.. function:: register(search_function, /)
160160

161161
Register a codec search function. Search functions are expected to take one
162162
argument, being the encoding name in all lower case letters with hyphens
@@ -168,7 +168,7 @@ function:
168168
Hyphens and spaces are converted to underscore.
169169

170170

171-
.. function:: unregister(search_function)
171+
.. function:: unregister(search_function, /)
172172

173173
Unregister a codec search function and clear the registry's cache.
174174
If the search function is not registered, do nothing.
@@ -416,7 +416,7 @@ In addition, the following error handler is specific to the given codecs:
416416
The set of allowed values can be extended by registering a new named error
417417
handler:
418418

419-
.. function:: register_error(name, error_handler)
419+
.. function:: register_error(name, error_handler, /)
420420

421421
Register the error handling function *error_handler* under the name *name*.
422422
The *error_handler* argument will be called during encoding and decoding
@@ -442,7 +442,7 @@ handler:
442442
Previously registered error handlers (including the standard error handlers)
443443
can be looked up by name:
444444

445-
.. function:: lookup_error(name)
445+
.. function:: lookup_error(name, /)
446446

447447
Return the error handler previously registered under the name *name*.
448448

@@ -607,9 +607,9 @@ define in order to be compatible with the Python codec registry.
607607
object.
608608

609609

610-
.. method:: encode(object, final=False)
610+
.. method:: encode(input, final=False)
611611

612-
Encodes *object* (taking the current state of the encoder into account)
612+
Encodes *input* (taking the current state of the encoder into account)
613613
and returns the resulting encoded object. If this is the last call to
614614
:meth:`encode` *final* must be true (the default is false).
615615

@@ -664,9 +664,9 @@ define in order to be compatible with the Python codec registry.
664664
object.
665665

666666

667-
.. method:: decode(object, final=False)
667+
.. method:: decode(input, final=False)
668668

669-
Decodes *object* (taking the current state of the decoder into account)
669+
Decodes *input* (taking the current state of the decoder into account)
670670
and returns the resulting decoded object. If this is the last call to
671671
:meth:`decode` *final* must be true (the default is false). If *final* is
672672
true the decoder must decode the input completely and must flush all

Doc/library/concurrent.futures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ And::
147147
executor.submit(wait_on_future)
148148

149149

150-
.. class:: ThreadPoolExecutor(max_workers=None, thread_name_prefix='', initializer=None, initargs=())
150+
.. class:: ThreadPoolExecutor(max_workers=None, thread_name_prefix='', initializer=None, initargs=(), **ctxkwargs)
151151

152152
An :class:`Executor` subclass that uses a pool of at most *max_workers*
153153
threads to execute calls asynchronously.

Doc/library/configparser.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,14 +1229,14 @@ ConfigParser Objects
12291229
interpolation.
12301230

12311231

1232-
.. method:: set(section, option, value)
1232+
.. method:: set(section, option, value=None)
12331233

12341234
If the given section exists, set the given option to the specified value;
12351235
otherwise raise :exc:`NoSectionError`. *option* and *value* must be
12361236
strings; if not, :exc:`TypeError` is raised.
12371237

12381238

1239-
.. method:: write(fileobject, space_around_delimiters=True)
1239+
.. method:: write(fp, space_around_delimiters=True)
12401240

12411241
Write a representation of the configuration to the specified :term:`file
12421242
object`, which must be opened in text mode (accepting strings). This
@@ -1266,12 +1266,12 @@ ConfigParser Objects
12661266
fact existed, return ``True``. Otherwise return ``False``.
12671267

12681268

1269-
.. method:: optionxform(option)
1269+
.. method:: optionxform(optionstr)
12701270

1271-
Transforms the option name *option* as found in an input file or as passed
1271+
Transforms the option name *optionstr* as found in an input file or as passed
12721272
in by client code to the form that should be used in the internal
12731273
structures. The default implementation returns a lower-case version of
1274-
*option*; subclasses may override this or client code can set an attribute
1274+
*optionstr*; subclasses may override this or client code can set an attribute
12751275
of this name on instances to affect this behavior.
12761276

12771277
You don't need to subclass the parser to use this method, you can also
@@ -1354,7 +1354,7 @@ RawConfigParser Objects
13541354
Added support for :const:`UNNAMED_SECTION`.
13551355

13561356

1357-
.. method:: set(section, option, value)
1357+
.. method:: set(section, option, value=None)
13581358

13591359
If the given section exists, set the given option to the specified value;
13601360
otherwise raise :exc:`NoSectionError`. While it is possible to use

Doc/library/dataclasses.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ directly specified in the :class:`!InventoryItem` definition shown above.
4646
Module contents
4747
---------------
4848

49-
.. decorator:: dataclass(*, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)
49+
.. decorator:: dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False, weakref_slot=False)
5050

5151
This function is a :term:`decorator` that is used to add generated
5252
:term:`special methods <special method>` to classes, as described below.

0 commit comments

Comments
 (0)