Skip to content

Commit

Permalink
Correct code blocks in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Jul 4, 2018
1 parent b64c266 commit 50f030d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ repos:
language: python
additional_dependencies: [pygments, restructuredtext_lint]
python_version: python3.6
- id: rst-backticks
name: rst ``code`` is two backticks
entry: ' `[^`]+[^_]`([^_]|$)'
language: pygrep
types: [rst]
18 changes: 9 additions & 9 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Bug Fixes
raises an exception. (`#3569
<https://github.com/pytest-dev/pytest/issues/3569>`_)

- Fix encoding error with `print` statements in doctests (`#3583
- Fix encoding error with ``print`` statements in doctests (`#3583
<https://github.com/pytest-dev/pytest/issues/3583>`_)


Expand Down Expand Up @@ -345,7 +345,7 @@ Features
``pytest_runtest_logfinish`` hooks when live logs are enabled. (`#3189
<https://github.com/pytest-dev/pytest/issues/3189>`_)

- Passing `--log-cli-level` in the command-line now automatically activates
- Passing ``--log-cli-level`` in the command-line now automatically activates
live logging. (`#3190 <https://github.com/pytest-dev/pytest/issues/3190>`_)

- Add command line option ``--deselect`` to allow deselection of individual
Expand Down Expand Up @@ -697,8 +697,8 @@ Trivial/Internal Changes
- Code cleanup. (`#3015 <https://github.com/pytest-dev/pytest/issues/3015>`_,
`#3021 <https://github.com/pytest-dev/pytest/issues/3021>`_)

- Clean up code by replacing imports and references of `_ast` to `ast`. (`#3018
<https://github.com/pytest-dev/pytest/issues/3018>`_)
- Clean up code by replacing imports and references of ``_ast`` to ``ast``.
(`#3018 <https://github.com/pytest-dev/pytest/issues/3018>`_)


Pytest 3.3.1 (2017-12-05)
Expand Down Expand Up @@ -1026,7 +1026,7 @@ Pytest 3.2.2 (2017-09-06)
Bug Fixes
---------

- Calling the deprecated `request.getfuncargvalue()` now shows the source of
- Calling the deprecated ``request.getfuncargvalue()`` now shows the source of
the call. (`#2681 <https://github.com/pytest-dev/pytest/issues/2681>`_)

- Allow tests declared as ``@staticmethod`` to use fixtures. (`#2699
Expand All @@ -1048,10 +1048,10 @@ Improved Documentation
``pytest.mark.MARKER_NAME.__call__`` (`#2604
<https://github.com/pytest-dev/pytest/issues/2604>`_)

- In one of the simple examples, use `pytest_collection_modifyitems()` to skip
- In one of the simple examples, use ``pytest_collection_modifyitems()`` to skip
tests based on a command-line option, allowing its sharing while preventing a
user error when acessing `pytest.config` before the argument parsing. (`#2653
<https://github.com/pytest-dev/pytest/issues/2653>`_)
user error when acessing ``pytest.config`` before the argument parsing.
(`#2653 <https://github.com/pytest-dev/pytest/issues/2653>`_)


Trivial/Internal Changes
Expand Down Expand Up @@ -1129,7 +1129,7 @@ Features
from parent classes or modules. (`#2516 <https://github.com/pytest-
dev/pytest/issues/2516>`_)

- Collection ignores local virtualenvs by default; `--collect-in-virtualenv`
- Collection ignores local virtualenvs by default; ``--collect-in-virtualenv``
overrides this behavior. (`#2518 <https://github.com/pytest-
dev/pytest/issues/2518>`_)

Expand Down
2 changes: 1 addition & 1 deletion doc/en/announce/release-2.9.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The py.test Development Team
Thanks `@biern`_ for the PR.

* Fix `traceback style docs`_ to describe all of the available options
(auto/long/short/line/native/no), with `auto` being the default since v2.6.
(auto/long/short/line/native/no), with ``auto`` being the default since v2.6.
Thanks `@hackebrot`_ for the PR.

* Fix (`#1422`_): junit record_xml_property doesn't allow multiple records
Expand Down
4 changes: 2 additions & 2 deletions doc/en/example/markers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ Skip and xfail marks can also be applied in this way, see :ref:`skip/xfail with
.. note::

If the data you are parametrizing happen to be single callables, you need to be careful
when marking these items. `pytest.mark.xfail(my_func)` won't work because it's also the
when marking these items. ``pytest.mark.xfail(my_func)`` won't work because it's also the
signature of a function being decorated. To resolve this ambiguity, you need to pass a
reason argument:
`pytest.mark.xfail(func_bar, reason="Issue#7")`.
``pytest.mark.xfail(func_bar, reason="Issue#7")``.


.. _`adding a custom marker from a plugin`:
Expand Down
2 changes: 1 addition & 1 deletion doc/en/goodpractices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ You can then install your package in "editable" mode::
pip install -e .

which lets you change your source code (both tests and application) and rerun tests at will.
This is similar to running `python setup.py develop` or `conda develop` in that it installs
This is similar to running ``python setup.py develop`` or ``conda develop`` in that it installs
your package using a symlink to your development code.

Once you are done with your work and want to make sure that your actual
Expand Down
2 changes: 0 additions & 2 deletions doc/en/mark.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ should add ``--strict`` to ``addopts``:
serial
.. `marker-iteration`
Marker revamp and iteration
---------------------------

Expand Down

0 comments on commit 50f030d

Please sign in to comment.