Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b8eab8e

Browse files
committed
Fix some syntax highlights in coding and contributing guide.
1 parent 30fd3d1 commit b8eab8e

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

doc/devel/coding_guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
.checklist li p {display: inline; }
88
</style>
99

10+
.. highlight:: bash
11+
1012
.. _pr-guidelines:
1113

1214
***********************

doc/devel/contributing.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -440,11 +440,13 @@ or manually with ::
440440
logging.basicConfig(level=logging.DEBUG)
441441
import matplotlib.pyplot as plt
442442

443-
Then they will receive messages like::
443+
Then they will receive messages like
444444

445-
DEBUG:matplotlib.backends:backend MacOSX version unknown
446-
DEBUG:matplotlib.yourmodulename:Here is some information
447-
DEBUG:matplotlib.yourmodulename:Here is some more detailed information
445+
.. code-block:: none
446+
447+
DEBUG:matplotlib.backends:backend MacOSX version unknown
448+
DEBUG:matplotlib.yourmodulename:Here is some information
449+
DEBUG:matplotlib.yourmodulename:Here is some more detailed information
448450
449451
Which logging level to use?
450452
~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -489,12 +491,10 @@ Matplotlib. For example, for the module::
489491
if bottom == top:
490492
warnings.warn('Attempting to set identical bottom==top')
491493

492-
493494
running the script::
494495

495496
from matplotlib import my_matplotlib_module
496-
my_matplotlib_module.set_range(0, 0) #set range
497-
497+
my_matplotlib_module.set_range(0, 0) # set range
498498

499499
will display::
500500

@@ -509,10 +509,12 @@ Modifying the module to use `._api.warn_external`::
509509
if bottom == top:
510510
_api.warn_external('Attempting to set identical bottom==top')
511511

512-
and running the same script will display::
512+
and running the same script will display
513+
514+
.. code-block:: none
513515
514-
UserWarning: Attempting to set identical bottom==top
515-
my_matplotlib_module.set_range(0, 0) #set range
516+
UserWarning: Attempting to set identical bottom==top
517+
my_matplotlib_module.set_range(0, 0) # set range
516518
517519
.. _logging tutorial: https://docs.python.org/3/howto/logging.html#logging-basic-tutorial
518520

0 commit comments

Comments
 (0)