Skip to content

Commit 71c7fd1

Browse files
Merge pull request #958 from valberg/patch-1
Fix rst remnants
2 parents 529d5bb + b304cf1 commit 71c7fd1

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

docs/usage.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ version_file = "pkg/_version.py"
3535
Where ``pkg`` is the name of your package.
3636

3737

38-
.. code-block:: shell
39-
40-
$ python -m setuptools_scm
41-
42-
# To explore other options, try:
43-
$ python -m setuptools_scm --help
38+
```commandline
39+
$ python -m setuptools_scm
4440
41+
# To explore other options, try:
42+
$ python -m setuptools_scm --help
43+
```
4544

4645
## as cli tool
4746

@@ -103,9 +102,9 @@ version = get_version(root='..', relative_to=__file__)
103102
### version at runtime
104103

105104
If you have opted not to hardcode the version number inside the package,
106-
you can retrieve it at runtime from PEP-0566_ metadata using
105+
you can retrieve it at runtime from [PEP-0566](https://www.python.org/dev/peps/pep-0566/) metadata using
107106
``importlib.metadata`` from the standard library (added in Python 3.8)
108-
or the `importlib_metadata`_ backport:
107+
or the [`importlib_metadata`](https://pypi.org/project/importlib-metadata/) backport:
109108

110109
```python title="package_name/__init__.py"
111110
from importlib.metadata import version, PackageNotFoundError
@@ -117,9 +116,6 @@ except PackageNotFoundError:
117116
pass
118117
```
119118

120-
.. _PEP-0566: https://www.python.org/dev/peps/pep-0566/
121-
.. _importlib_metadata: https://pypi.org/project/importlib-metadata/
122-
123119

124120
### Usage from Sphinx
125121

0 commit comments

Comments
 (0)