Skip to content

Commit

Permalink
Fix highlighting of some doc snippets. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Nov 13, 2020
1 parent c53adf3 commit f0c08d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/greenlet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ active when it was spawned. You can assign to a greenlet's
example:

.. doctest::
:pyversion: > 3.7
:pyversion: > 3.7

>>> import greenlet
>>> import contextvars
Expand All @@ -406,7 +406,7 @@ By default, a new greenlet gets an empty context, unrelated to the
current context:

.. doctest::
:pyversion: > 3.7
:pyversion: > 3.7

>>> gr1 = greenlet.greenlet(set_it)
>>> gr1.switch(2)
Expand All @@ -419,7 +419,7 @@ You can make a greenlet get a copy of the current context when it is
created, like asyncio:

.. doctest::
:pyversion: > 3.7
:pyversion: > 3.7

>>> gr2 = greenlet.greenlet(set_it)
>>> gr2.gr_context = contextvars.copy_context()
Expand All @@ -431,7 +431,7 @@ You can also make a greenlet *share* the current context, like older,
non-contextvars-aware versions of greenlet:

.. doctest::
:pyversion: > 3.7
:pyversion: > 3.7

>>> gr3 = greenlet.greenlet(set_it)
>>> gr3.gr_context = greenlet.getcurrent().gr_context
Expand All @@ -444,7 +444,7 @@ top-level function in a call to :meth:`Context.run()
<contextvars.Context.run>`:

.. doctest::
:pyversion: > 3.7
:pyversion: > 3.7

>>> _ = example.set(1)
>>> gr4 = greenlet.greenlet(contextvars.copy_context().run)
Expand Down

0 comments on commit f0c08d9

Please sign in to comment.