From b304cf1f5ac6a08827a288d3f798fd49e13bbb42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Fri, 13 Oct 2023 10:35:23 +0200 Subject: [PATCH] Fix rst remnants --- docs/usage.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index f83d03c3..0d9fe27b 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -36,13 +36,12 @@ version_file = "pkg/_version.py" Where ``pkg`` is the name of your package. -.. code-block:: shell - - $ python -m setuptools_scm - - # To explore other options, try: - $ python -m setuptools_scm --help +```commandline +$ python -m setuptools_scm +# To explore other options, try: +$ python -m setuptools_scm --help +``` ## as cli tool @@ -104,9 +103,9 @@ version = get_version(root='..', relative_to=__file__) ### version at runtime If you have opted not to hardcode the version number inside the package, -you can retrieve it at runtime from PEP-0566_ metadata using +you can retrieve it at runtime from [PEP-0566](https://www.python.org/dev/peps/pep-0566/) metadata using ``importlib.metadata`` from the standard library (added in Python 3.8) -or the `importlib_metadata`_ backport: +or the [`importlib_metadata`](https://pypi.org/project/importlib-metadata/) backport: ```python # contents of package_name/__init__.py @@ -119,9 +118,6 @@ except PackageNotFoundError: pass ``` -.. _PEP-0566: https://www.python.org/dev/peps/pep-0566/ -.. _importlib_metadata: https://pypi.org/project/importlib-metadata/ - ### Usage from Sphinx