Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix signatures markup
  • Loading branch information
andresdelfino committed Dec 5, 2020
commit 2a2a63f4ac3de7536bfec61157c641aa8dcd503a
6 changes: 3 additions & 3 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Creating Futures and Tasks

.. versionadded:: 3.5.2

.. method:: loop.create_task(coro, \*, name=None)
.. method:: loop.create_task(coro, *, name=None)

Schedule the execution of a :ref:`coroutine`.
Return a :class:`Task` object.
Expand Down Expand Up @@ -964,7 +964,7 @@ convenient.
DNS
^^^

.. coroutinemethod:: loop.getaddrinfo(host, port, \*, family=0, \
.. coroutinemethod:: loop.getaddrinfo(host, port, *, family=0, \
type=0, proto=0, flags=0)

Asynchronous version of :meth:`socket.getaddrinfo`.
Expand Down Expand Up @@ -1319,7 +1319,7 @@ async/await code consider using the high-level
conforms to the :class:`asyncio.SubprocessTransport` base class and
*protocol* is an object instantiated by the *protocol_factory*.

.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, \*, \
.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, *, \
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, **kwargs)

Expand Down
6 changes: 3 additions & 3 deletions Doc/library/asyncio-future.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Future Functions
.. versionadded:: 3.5


.. function:: ensure_future(obj, \*, loop=None)
.. function:: ensure_future(obj, *, loop=None)

Return:

Expand All @@ -58,7 +58,7 @@ Future Functions
The function accepts any :term:`awaitable` object.


.. function:: wrap_future(future, \*, loop=None)
.. function:: wrap_future(future, *, loop=None)

Wrap a :class:`concurrent.futures.Future` object in a
:class:`asyncio.Future` object.
Expand All @@ -67,7 +67,7 @@ Future Functions
Future Object
=============

.. class:: Future(\*, loop=None)
.. class:: Future(*, loop=None)

A Future represents an eventual result of an asynchronous
operation. Not thread-safe.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/asyncio-stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The following top-level asyncio functions can be used to create
and work with streams:


.. coroutinefunction:: open_connection(host=None, port=None, \*, \
.. coroutinefunction:: open_connection(host=None, port=None, *, \
limit=None, ssl=None, family=0, proto=0, \
flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None)
Expand Down Expand Up @@ -103,7 +103,7 @@ and work with streams:

.. rubric:: Unix Sockets

.. coroutinefunction:: open_unix_connection(path=None, \*, limit=None, \
.. coroutinefunction:: open_unix_connection(path=None, *, limit=None, \
ssl=None, sock=None, server_hostname=None, \
ssl_handshake_timeout=None)

Expand Down
14 changes: 7 additions & 7 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ is :meth:`loop.run_in_executor`.
Running an asyncio Program
==========================

.. function:: run(coro, \*, debug=False)
.. function:: run(coro, *, debug=False)

Execute the :term:`coroutine` *coro* and return the result.

Expand Down Expand Up @@ -247,7 +247,7 @@ Running an asyncio Program
Creating Tasks
==============

.. function:: create_task(coro, \*, name=None)
.. function:: create_task(coro, *, name=None)

Wrap the *coro* :ref:`coroutine <coroutine>` into a :class:`Task`
and schedule its execution. Return the Task object.
Expand Down Expand Up @@ -488,7 +488,7 @@ Timeouts
Waiting Primitives
==================

.. coroutinefunction:: wait(aws, \*, timeout=None, return_when=ALL_COMPLETED)
.. coroutinefunction:: wait(aws, *, timeout=None, return_when=ALL_COMPLETED)

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently and block until the condition specified
Expand Down Expand Up @@ -573,7 +573,7 @@ Waiting Primitives
deprecated.


.. function:: as_completed(aws, \*, timeout=None)
.. function:: as_completed(aws, *, timeout=None)

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently. Return an iterator of coroutines.
Expand Down Expand Up @@ -723,7 +723,7 @@ Introspection
Task Object
===========

.. class:: Task(coro, \*, loop=None, name=None)
.. class:: Task(coro, *, loop=None, name=None)

A :class:`Future-like <Future>` object that runs a Python
:ref:`coroutine <coroutine>`. Not thread-safe.
Expand Down Expand Up @@ -889,7 +889,7 @@ Task Object
See the documentation of :meth:`Future.remove_done_callback`
for more details.

.. method:: get_stack(\*, limit=None)
.. method:: get_stack(*, limit=None)

Return the list of stack frames for this Task.

Expand All @@ -910,7 +910,7 @@ Task Object
stack are returned, but the oldest frames of a traceback are
returned. (This matches the behavior of the traceback module.)

.. method:: print_stack(\*, limit=None, file=None)
.. method:: print_stack(*, limit=None, file=None)

Print the stack or traceback for this Task.

Expand Down
4 changes: 2 additions & 2 deletions Doc/library/compileall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ runtime.
Public functions
----------------

.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)

Recursively descend the directory tree named by *dir*, compiling all :file:`.py`
files along the way. Return a true value if all the files compiled successfully,
Expand Down Expand Up @@ -231,7 +231,7 @@ Public functions
Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* arguments.
Default value of *maxlevels* was changed from ``10`` to ``sys.getrecursionlimit()``

.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)

Compile the file with path *fullname*. Return a true value if the file
compiled successfully, and a false value otherwise.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/concurrent.futures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Executor Objects
.. versionchanged:: 3.5
Added the *chunksize* argument.

.. method:: shutdown(wait=True, \*, cancel_futures=False)
.. method:: shutdown(wait=True, *, cancel_futures=False)

Signal the executor that it should free any resources that it is using
when the currently pending futures are done executing. Calls to
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/contextvars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ See also :pep:`567` for additional details.
Context Variables
-----------------

.. class:: ContextVar(name, [\*, default])
.. class:: ContextVar(name, [*, default])

This class is used to declare a new Context Variable, e.g.::

Expand Down
4 changes: 2 additions & 2 deletions Doc/library/importlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ find and load modules.
directory for ``''`` (i.e. the empty string).


.. class:: FileFinder(path, \*loader_details)
.. class:: FileFinder(path, *loader_details)

A concrete implementation of :class:`importlib.abc.PathEntryFinder` which
caches results from the file system.
Expand Down Expand Up @@ -1181,7 +1181,7 @@ find and load modules.

Clear out the internal cache.

.. classmethod:: path_hook(\*loader_details)
.. classmethod:: path_hook(*loader_details)

A class method which returns a closure for use on :attr:`sys.path_hooks`.
An instance of :class:`FileFinder` is returned by the closure using the
Expand Down
8 changes: 4 additions & 4 deletions Doc/library/inspect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ The Signature object represents the call signature of a callable object and its
return annotation. To retrieve a Signature object, use the :func:`signature`
function.

.. function:: signature(callable, \*, follow_wrapped=True)
.. function:: signature(callable, *, follow_wrapped=True)

Return a :class:`Signature` object for the given ``callable``::

Expand Down Expand Up @@ -597,7 +597,7 @@ function.
C provide no metadata about their arguments.


.. class:: Signature(parameters=None, \*, return_annotation=Signature.empty)
.. class:: Signature(parameters=None, *, return_annotation=Signature.empty)

A Signature object represents the call signature of a function and its return
annotation. For each parameter accepted by the function it stores a
Expand Down Expand Up @@ -668,7 +668,7 @@ function.
>>> str(new_sig)
"(a, b) -> 'new return anno'"

.. classmethod:: Signature.from_callable(obj, \*, follow_wrapped=True)
.. classmethod:: Signature.from_callable(obj, *, follow_wrapped=True)

Return a :class:`Signature` (or its subclass) object for a given callable
``obj``. Pass ``follow_wrapped=False`` to get a signature of ``obj``
Expand All @@ -684,7 +684,7 @@ function.
.. versionadded:: 3.5


.. class:: Parameter(name, kind, \*, default=Parameter.empty, annotation=Parameter.empty)
.. class:: Parameter(name, kind, *, default=Parameter.empty, annotation=Parameter.empty)

Parameter objects are *immutable*. Instead of modifying a Parameter object,
you can use :meth:`Parameter.replace` to create a modified copy.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/lzma.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ from multiple threads, it is necessary to protect it with a lock.
Reading and writing compressed files
------------------------------------

.. function:: open(filename, mode="rb", \*, format=None, check=-1, preset=None, filters=None, encoding=None, errors=None, newline=None)
.. function:: open(filename, mode="rb", *, format=None, check=-1, preset=None, filters=None, encoding=None, errors=None, newline=None)

Open an LZMA-compressed file in binary or text mode, returning a :term:`file
object`.
Expand Down Expand Up @@ -69,7 +69,7 @@ Reading and writing compressed files
Accepts a :term:`path-like object`.


.. class:: LZMAFile(filename=None, mode="r", \*, format=None, check=-1, preset=None, filters=None)
.. class:: LZMAFile(filename=None, mode="r", *, format=None, check=-1, preset=None, filters=None)

Open an LZMA-compressed file in binary mode.

Expand Down
10 changes: 5 additions & 5 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ features:
Accepts a :term:`path-like object`.


.. function:: lstat(path, \*, dir_fd=None)
.. function:: lstat(path, *, dir_fd=None)

Perform the equivalent of an :c:func:`lstat` system call on the given path.
Similar to :func:`~os.stat`, but does not follow symbolic links. Return a
Expand Down Expand Up @@ -2498,7 +2498,7 @@ features:
On the first, uncached call, a system call is required on Windows but
not on Unix.

.. method:: is_dir(\*, follow_symlinks=True)
.. method:: is_dir(*, follow_symlinks=True)

Return ``True`` if this entry is a directory or a symbolic link pointing
to a directory; return ``False`` if the entry is or points to any other
Expand All @@ -2522,7 +2522,7 @@ features:
This method can raise :exc:`OSError`, such as :exc:`PermissionError`,
but :exc:`FileNotFoundError` is caught and not raised.

.. method:: is_file(\*, follow_symlinks=True)
.. method:: is_file(*, follow_symlinks=True)

Return ``True`` if this entry is a file or a symbolic link pointing to a
file; return ``False`` if the entry is or points to a directory or other
Expand Down Expand Up @@ -2552,7 +2552,7 @@ features:
This method can raise :exc:`OSError`, such as :exc:`PermissionError`,
but :exc:`FileNotFoundError` is caught and not raised.

.. method:: stat(\*, follow_symlinks=True)
.. method:: stat(*, follow_symlinks=True)

Return a :class:`stat_result` object for this entry. This method
follows symbolic links by default; to stat a symbolic link add the
Expand Down Expand Up @@ -2584,7 +2584,7 @@ features:
for :class:`bytes` paths on Windows.


.. function:: stat(path, \*, dir_fd=None, follow_symlinks=True)
.. function:: stat(path, *, dir_fd=None, follow_symlinks=True)

Get the status of a file or a file descriptor. Perform the equivalent of a
:c:func:`stat` system call on the given path. *path* may be specified as
Expand Down
12 changes: 6 additions & 6 deletions Doc/library/pickle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ The :mod:`pickle` module provides the following constants:
The :mod:`pickle` module provides the following functions to make the pickling
process more convenient:

.. function:: dump(obj, file, protocol=None, \*, fix_imports=True, buffer_callback=None)
.. function:: dump(obj, file, protocol=None, *, fix_imports=True, buffer_callback=None)

Write the pickled representation of the object *obj* to the open
:term:`file object` *file*. This is equivalent to
Expand All @@ -225,7 +225,7 @@ process more convenient:
.. versionchanged:: 3.8
The *buffer_callback* argument was added.

.. function:: dumps(obj, protocol=None, \*, fix_imports=True, buffer_callback=None)
.. function:: dumps(obj, protocol=None, *, fix_imports=True, buffer_callback=None)

Return the pickled representation of the object *obj* as a :class:`bytes` object,
instead of writing it to a file.
Expand All @@ -236,7 +236,7 @@ process more convenient:
.. versionchanged:: 3.8
The *buffer_callback* argument was added.

.. function:: load(file, \*, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)
.. function:: load(file, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)

Read the pickled representation of an object from the open :term:`file object`
*file* and return the reconstituted object hierarchy specified therein.
Expand All @@ -252,7 +252,7 @@ process more convenient:
.. versionchanged:: 3.8
The *buffers* argument was added.

.. function:: loads(data, /, \*, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)
.. function:: loads(data, /, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)

Return the reconstituted object hierarchy of the pickled representation
*data* of an object. *data* must be a :term:`bytes-like object`.
Expand Down Expand Up @@ -296,7 +296,7 @@ The :mod:`pickle` module defines three exceptions:
The :mod:`pickle` module exports three classes, :class:`Pickler`,
:class:`Unpickler` and :class:`PickleBuffer`:

.. class:: Pickler(file, protocol=None, \*, fix_imports=True, buffer_callback=None)
.. class:: Pickler(file, protocol=None, *, fix_imports=True, buffer_callback=None)

This takes a binary file for writing a pickle data stream.

Expand Down Expand Up @@ -391,7 +391,7 @@ The :mod:`pickle` module exports three classes, :class:`Pickler`,
Use :func:`pickletools.optimize` if you need more compact pickles.


.. class:: Unpickler(file, \*, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)
.. class:: Unpickler(file, *, fix_imports=True, encoding="ASCII", errors="strict", buffers=None)

This takes a binary file for reading a pickle data stream.

Expand Down
8 changes: 4 additions & 4 deletions Doc/library/plistlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ or :class:`datetime.datetime` objects.

This module defines the following functions:

.. function:: load(fp, \*, fmt=None, dict_type=dict)
.. function:: load(fp, *, fmt=None, dict_type=dict)

Read a plist file. *fp* should be a readable and binary file object.
Return the unpacked root object (which usually is a
Expand Down Expand Up @@ -80,15 +80,15 @@ This module defines the following functions:
.. versionadded:: 3.4


.. function:: loads(data, \*, fmt=None, dict_type=dict)
.. function:: loads(data, *, fmt=None, dict_type=dict)

Load a plist from a bytes object. See :func:`load` for an explanation of
the keyword arguments.

.. versionadded:: 3.4


.. function:: dump(value, fp, \*, fmt=FMT_XML, sort_keys=True, skipkeys=False)
.. function:: dump(value, fp, *, fmt=FMT_XML, sort_keys=True, skipkeys=False)

Write *value* to a plist file. *Fp* should be a writable, binary
file object.
Expand Down Expand Up @@ -116,7 +116,7 @@ This module defines the following functions:
.. versionadded:: 3.4


.. function:: dumps(value, \*, fmt=FMT_XML, sort_keys=True, skipkeys=False)
.. function:: dumps(value, *, fmt=FMT_XML, sort_keys=True, skipkeys=False)

Return *value* as a plist-formatted bytes object. See
the documentation for :func:`dump` for an explanation of the keyword
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/shutil.rst
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Directory and files operations
copy the file more efficiently. See
:ref:`shutil-platform-dependent-efficient-copy-operations` section.

.. function:: ignore_patterns(\*patterns)
.. function:: ignore_patterns(*patterns)

This factory function creates a function that can be used as a callable for
:func:`copytree`\'s *ignore* argument, ignoring files and directories that
Expand Down
Loading