mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Use Python syntax highlighting (#453)
* Use Python syntax highlighting * Use code directive instead * use python syntax highlighting in the docs * update Programming Language classifers for supported Python versions * use %s instead
This commit is contained in:
committed by
Dave Jones
parent
855377a664
commit
0c9e4a9575
@@ -23,7 +23,9 @@ About
|
|||||||
=====
|
=====
|
||||||
|
|
||||||
Component interfaces are provided to allow a frictionless way to get started
|
Component interfaces are provided to allow a frictionless way to get started
|
||||||
with physical computing::
|
with physical computing:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
from gpiozero import LED
|
from gpiozero import LED
|
||||||
from time import sleep
|
from time import sleep
|
||||||
@@ -37,7 +39,9 @@ with physical computing::
|
|||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
With very little code, you can quickly get going connecting your components
|
With very little code, you can quickly get going connecting your components
|
||||||
together::
|
together:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
from gpiozero import LED, Button
|
from gpiozero import LED, Button
|
||||||
from signal import pause
|
from signal import pause
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
from datetime import datetime
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||||
import setup as _setup
|
import setup as _setup
|
||||||
@@ -52,12 +53,13 @@ source_suffix = '.rst'
|
|||||||
#source_encoding = 'utf-8-sig'
|
#source_encoding = 'utf-8-sig'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
project = _setup.__project__.title()
|
project = _setup.__project__.title()
|
||||||
copyright = '2015 %s' % _setup.__author__
|
copyright = '2015-%s %s' % (datetime.now().year, _setup.__author__)
|
||||||
version = _setup.__version__
|
version = _setup.__version__
|
||||||
release = _setup.__version__
|
release = _setup.__version__
|
||||||
#language = None
|
#language = None
|
||||||
#today_fmt = '%B %d, %Y'
|
#today_fmt = '%B %d, %Y'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
highlight_language='python3'
|
||||||
#default_role = None
|
#default_role = None
|
||||||
#add_function_parentheses = True
|
#add_function_parentheses = True
|
||||||
#add_module_names = True
|
#add_module_names = True
|
||||||
@@ -73,8 +75,8 @@ autodoc_member_order = 'groupwise'
|
|||||||
# -- Intersphinx configuration --------------------------------------------
|
# -- Intersphinx configuration --------------------------------------------
|
||||||
|
|
||||||
intersphinx_mapping = {
|
intersphinx_mapping = {
|
||||||
'python': ('http://docs.python.org/3.4', None),
|
'python': ('https://docs.python.org/3.5', None),
|
||||||
'picamera': ('http://picamera.readthedocs.io/en/latest', None),
|
'picamera': ('https://picamera.readthedocs.io/en/latest', None),
|
||||||
}
|
}
|
||||||
|
|
||||||
# -- Options for HTML output ----------------------------------------------
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|||||||
6
setup.py
6
setup.py
@@ -36,7 +36,13 @@ __classifiers__ = [
|
|||||||
"Topic :: System :: Hardware",
|
"Topic :: System :: Hardware",
|
||||||
"License :: OSI Approved :: BSD License",
|
"License :: OSI Approved :: BSD License",
|
||||||
"Programming Language :: Python :: 2",
|
"Programming Language :: Python :: 2",
|
||||||
|
"Programming Language :: Python :: 2.7",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
|
"Programming Language :: Python :: 3.2",
|
||||||
|
"Programming Language :: Python :: 3.3",
|
||||||
|
"Programming Language :: Python :: 3.4",
|
||||||
|
"Programming Language :: Python :: 3.5",
|
||||||
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
]
|
]
|
||||||
|
|
||||||
__keywords__ = [
|
__keywords__ = [
|
||||||
|
|||||||
Reference in New Issue
Block a user