Skip to content

Commit efece5c

Browse files
authored
Merge pull request #951 from bhrutledge/more-code-block
Replace `::` with shell `code-block::`
2 parents 7f1e998 + 663626f commit efece5c

7 files changed

Lines changed: 40 additions & 22 deletions

source/contribute.rst

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ in order to test your changes. In order to build this guide locally, you'll
7777
need:
7878

7979
1. `Nox <https://nox.readthedocs.io/en/latest/>`_. You can install or upgrade
80-
nox using ``pip``::
80+
nox using ``pip``:
81+
82+
.. code-block:: bash
8183
8284
python -m pip install --user nox
8385
@@ -88,19 +90,23 @@ need:
8890
.. _Hitchhiker's Guide to Python installation instructions:
8991
http://docs.python-guide.org/en/latest/starting/installation/
9092

91-
To build the guide, run the following bash command in the source folder::
93+
To build the guide, run the following bash command in the source folder:
94+
95+
.. code-block:: bash
9296
93-
nox -s build
97+
nox -s build
9498
9599
After the process has completed you can find the HTML output in the
96100
``./build/html`` directory. You can open the ``index.html`` file to view the
97101
guide in web browser, but it's recommended to serve the guide using an HTTP
98102
server.
99103

100104
You can build the guide and serve it via an HTTP server using the following
101-
command::
105+
command:
106+
107+
.. code-block:: bash
102108
103-
nox -s preview
109+
nox -s preview
104110
105111
The guide will be browsable via http://localhost:8000.
106112

source/guides/distributing-packages-using-setuptools.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,9 @@ both installed and editable in project form.
666666

667667
Assuming you're in the root of your project directory, then run:
668668

669-
::
669+
.. code-block:: bash
670670
671-
python -m pip install -e .
671+
python -m pip install -e .
672672
673673
674674
Although somewhat cryptic, ``-e`` is short for ``--editable``, and ``.`` refers
@@ -698,7 +698,9 @@ Otherwise, the dependency will be fulfilled from PyPI, due to the installation o
698698
<pip:Requirements Files>` section in the pip docs. For more on VCS installs,
699699
see the :ref:`VCS Support <pip:VCS Support>` section of the pip docs.
700700

701-
Lastly, if you don't want to install any dependencies at all, you can run::
701+
Lastly, if you don't want to install any dependencies at all, you can run:
702+
703+
.. code-block:: bash
702704
703705
python -m pip install -e . --no-deps
704706
@@ -880,9 +882,11 @@ distribution file(s) to upload.
880882
directive). **Before** trying to upload your distribution, you should check
881883
to see if your brief / long descriptions provided in :file:`setup.py` are
882884
valid. You can do this by running :std:doc:`twine check <index>` on
883-
your package files::
885+
your package files:
886+
887+
.. code-block:: bash
884888
885-
twine check dist/*
889+
twine check dist/*
886890
887891
Create an account
888892
-----------------

source/guides/dropping-older-python-versions.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ Within a Python source package (the zip or the tar-gz file you download) is a te
105105
This file is generated by Distutils or :ref:`setuptools` when it generates the source package.
106106
The file contains a set of keys and values, the list of keys is part of the PyPa standard metadata format.
107107

108-
You can see the contents of the generated file like this::
108+
You can see the contents of the generated file like this:
109+
110+
.. code-block:: bash
109111
110112
tar xfO dist/my-package-1.0.0.tar.gz my-package-1.0.0/PKG-INFO
111113

source/guides/index-mirrors-and-caches.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ cached copies of :term:`packages <Distribution Package>`:
3535
those downloaded files instead of going to PyPI.
3636
2. A variation on the above which pre-builds the installation files for
3737
the requirements using `python -m pip wheel
38-
<https://pip.readthedocs.io/en/latest/reference/pip_wheel.html>`_::
38+
<https://pip.readthedocs.io/en/latest/reference/pip_wheel.html>`_:
3939

40-
python -m pip wheel --wheel-dir=/tmp/wheelhouse SomeProject
41-
python -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject
40+
.. code-block:: bash
41+
42+
python -m pip wheel --wheel-dir=/tmp/wheelhouse SomeProject
43+
python -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject
4244
4345
4446
Caching with devpi

source/guides/making-a-pypi-friendly-readme.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ You can check your README for markup errors before uploading as follows:
122122
2. Build the sdist and wheel for your project as described under
123123
:ref:`Packaging Your Project`.
124124

125-
3. Run ``twine check`` on the sdist and wheel::
125+
3. Run ``twine check`` on the sdist and wheel:
126126

127-
twine check dist/*
127+
.. code-block:: bash
128+
129+
twine check dist/*
128130
129131
This command will report any problems rendering your README. If your markup
130132
renders fine, the command will output ``Checking distribution FILENAME:

source/guides/using-manifest-in.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ setuptools will automatically convert the slashes to the local platform's
9393
appropriate directory separator.
9494

9595
Commands are processed in the order they appear in the :file:`MANIFEST.in`
96-
file. For example, given the commands::
96+
file. For example, given the commands:
97+
98+
.. code-block:: bash
9799
98100
graft tests
99101
global-exclude *.py[cod]

source/tutorials/installing-packages.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ In both of the above cases, Windows users should _not_ use the
281281
:command:`source` command, but should rather run the :command:`activate`
282282
script directly from the command shell like so:
283283

284-
::
284+
.. code-block:: bat
285285
286-
<DIR>\Scripts\activate
286+
<DIR>\Scripts\activate
287287
288288
289289
@@ -618,10 +618,10 @@ create a helper application that presents the data in a :pep:`503` compliant
618618
index format, and use the ``--extra-index-url`` flag to direct pip to use
619619
that index.
620620

621-
::
621+
.. code-block:: bash
622622
623-
./s3helper --port=7777
624-
python -m pip install --extra-index-url http://localhost:7777 SomeProject
623+
./s3helper --port=7777
624+
python -m pip install --extra-index-url http://localhost:7777 SomeProject
625625
626626
627627
Installing Prereleases

0 commit comments

Comments
 (0)