doc: flake8 and doc8

This commit is contained in:
Laurens Valk
2019-10-18 17:12:16 +02:00
parent 529f8fe31c
commit aa8c95234e
5 changed files with 21 additions and 52 deletions
+2 -2
View File
@@ -4,9 +4,9 @@ url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
sphinx = "*"
sphinx = "==1.7.9"
flake8 = "*"
sphinx-rtd-theme = "==0.4.2"
sphinx-rtd-theme = "==0.4.3"
doc8 = "*"
[packages]
Generated
+8 -43
View File
@@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "ef4d5b0066d2a9807d355800c6dfb943766ded5cc36cc5b300a001806d2c51e5"
"sha256": "ecfbf828384f555e2c3144e503c8b7181aeabc626b3ebb5aa49780c4031b7b81"
},
"pipfile-spec": 6,
"requires": {
@@ -215,11 +215,11 @@
},
"sphinx": {
"hashes": [
"sha256:0d586b0f8c2fc3cc6559c5e8fd6124628110514fda0e5d7c82e682d749d2e845",
"sha256:839a3ed6f6b092bb60f492024489cc9e6991360fb9f52ed6361acd510d261069"
"sha256:217a7705adcb573da5bbe1e0f5cab4fa0bd89fd9342c9159121746f593c2d5a4",
"sha256:a602513f385f1d5785ff1ca420d9c7eb1a1b63381733b2f0ea8188a391314a86"
],
"index": "pypi",
"version": "==2.2.0"
"version": "==1.7.9"
},
"sphinx-rtd-theme": {
"hashes": [
@@ -229,47 +229,12 @@
"index": "pypi",
"version": "==0.4.3"
},
"sphinxcontrib-applehelp": {
"sphinxcontrib-websupport": {
"hashes": [
"sha256:edaa0ab2b2bc74403149cb0209d6775c96de797dfd5b5e2a71981309efab3897",
"sha256:fb8dee85af95e5c30c91f10e7eb3c8967308518e0f7488a2828ef7bc191d0d5d"
"sha256:1501befb0fdf1d1c29a800fdbf4ef5dc5369377300ddbdd16d2cd40e54c6eefc",
"sha256:e02f717baf02d0b6c3dd62cf81232ffca4c9d5c331e03766982e3ff9f1d2bc3f"
],
"version": "==1.0.1"
},
"sphinxcontrib-devhelp": {
"hashes": [
"sha256:6c64b077937330a9128a4da74586e8c2130262f014689b4b89e2d08ee7294a34",
"sha256:9512ecb00a2b0821a146736b39f7aeb90759834b07e81e8cc23a9c70bacb9981"
],
"version": "==1.0.1"
},
"sphinxcontrib-htmlhelp": {
"hashes": [
"sha256:4670f99f8951bd78cd4ad2ab962f798f5618b17675c35c5ac3b2132a14ea8422",
"sha256:d4fd39a65a625c9df86d7fa8a2d9f3cd8299a3a4b15db63b50aac9e161d8eff7"
],
"version": "==1.0.2"
},
"sphinxcontrib-jsmath": {
"hashes": [
"sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178",
"sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"
],
"version": "==1.0.1"
},
"sphinxcontrib-qthelp": {
"hashes": [
"sha256:513049b93031beb1f57d4daea74068a4feb77aa5630f856fcff2e50de14e9a20",
"sha256:79465ce11ae5694ff165becda529a600c754f4bc459778778c7017374d4d406f"
],
"version": "==1.0.2"
},
"sphinxcontrib-serializinghtml": {
"hashes": [
"sha256:c0efb33f8052c04fd7a26c0a07f1678e8512e0faec19f4aa8f2473a8b81d5227",
"sha256:db6615af393650bf1151a6cd39120c29abaf93cc60db8c48eb2dddbfdc3a9768"
],
"version": "==1.1.3"
"version": "==1.1.2"
},
"stevedore": {
"hashes": [
+8 -7
View File
@@ -9,23 +9,24 @@
.. rubric:: Motor and Sensor Ports
+-------------------+-------------------+-------------------+-------------------+
| .. data:: Port.A | .. data:: Port.B | .. data:: Port.C | .. data:: Port.D |
+-------------------+-------------------+-------------------+-------------------+
| .. data:: Port.S1 | .. data:: Port.S2 | .. data:: Port.S3 | .. data:: Port.S4 |
+-------------------+-------------------+-------------------+-------------------+
+-----------------+-----------------+-----------------+-----------------+
|.. data:: Port.A |.. data:: Port.B |.. data:: Port.C |.. data:: Port.D |
+-----------------+-----------------+-----------------+-----------------+
|.. data:: Port.S1|.. data:: Port.S2|.. data:: Port.S3|.. data:: Port.S4|
+-----------------+-----------------+-----------------+-----------------+
.. rubric:: Overview of built-in devices
The following built-in devices are automatically initialized when you
create an `EV3Brick` object. Usage is described in the sections below.
.. attribute:: buttons = KeyPad([KeyPad.UP, KeyPad.DOWN, KeyPad.LEFT, KeyPad.RIGHT])
.. attribute::
buttons = KeyPad([KeyPad.UP, KeyPad.DOWN, KeyPad.LEFT, KeyPad.RIGHT])
.. attribute:: display = Display(width=178, height=128)
.. attribute:: light = ColorLight([Color.RED, Color.GREEN])
.. attribute:: speaker = Speaker()
.. attribute:: battery = Battery()
.. rubric:: Using the buttons
.. automethod:: pybricks._instances.buttons.pressed
+2
View File
@@ -4,6 +4,7 @@ from .builtins import Speaker, Display, Battery, ColorLight, KeyPad, LightArray
from types import ModuleType
def make_instance(classdef):
"""Make a class instance to look like a module so Sphinx can parse it."""
name = ''
@@ -13,6 +14,7 @@ def make_instance(classdef):
setattr(mod, m.__name__, m)
return mod
light = make_instance(ColorLight)
lights = make_instance(LightArray)
+1
View File
@@ -2,6 +2,7 @@
from enum import Enum
from .builtins import Speaker, Display, Battery, ColorLight, KeyPad
class EV3Brick():
"""LEGO® MINDSTORMS® EV3 Brick.
"""