Skip to content

Commit

Permalink
Fix rst remnants
Browse files Browse the repository at this point in the history
  • Loading branch information
valberg authored Oct 13, 2023
1 parent 06e0aaf commit b304cf1
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit b304cf1

Please sign in to comment.