From c218cc5443dbcec77c81a03391c6ae2a566a7a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E4=B9=9D=E9=BC=8E?= <109224573@qq.com> Date: Fri, 2 Oct 2020 20:07:58 +0800 Subject: docs: code-block style fix --- docs/userguide/entry_point.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/userguide') diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index 7f5165a8..f4c43c6e 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -14,7 +14,7 @@ Console Scripts =============== First consider an example without entry points. Imagine a package -defined thus:: +defined thus: .. code-block:: bash @@ -38,7 +38,7 @@ and ``__main__.py`` providing a hook: hello_world() After installing the package, the function may be invoked through the -`runpy `_ module:: +`runpy `_ module: .. code-block:: bash @@ -49,7 +49,7 @@ user-friendly name for installers of the package to execute. Installers like pip will create wrapper scripts to execute a function. In the above example, to create a command ``hello-world`` that invokes ``timmins.hello_world``, add a console script entry point to -``setup.cfg``:: +``setup.cfg``: .. code-block:: ini @@ -96,7 +96,7 @@ For a project wishing to solicit entry points, Setuptools recommends the module (part of stdlib since Python 3.8) or its backport, `importlib_metadata `_. -For example, to find the console script entry points from the example above:: +For example, to find the console script entry points from the example above: .. code-block:: python @@ -115,7 +115,7 @@ method to import and load that entry point (module or object). hello-world = timmins:hello_world Then, a different project wishing to load 'my.plugins' plugins could run -the following routine to load (and invoke) such plugins:: +the following routine to load (and invoke) such plugins: .. code-block:: python @@ -140,7 +140,7 @@ For such an entry point, declare in square brakets any number of dependency be viable if their extras were declared and installed. See the :ref:`guide on dependencies management ` for more information on defining extra requirements. Consider from the -above example:: +above example: .. code-block:: ini -- cgit v1.2.1