Skip to content

Commit 8873030

Browse files
committed
PEP8: W293 blank line contains whitespace
1 parent 52592f3 commit 8873030

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

ev3dev.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def commands(self):
249249
Returns a list of commands that are supported by the motor
250250
controller. Possible values are `run-forever`, `run-to-abs-pos`, `run-to-rel-pos`,
251251
`run-timed`, `run-direct`, `stop` and `reset`. Not all commands may be supported.
252-
252+
253253
- `run-forever` will cause the motor to run until another command is sent.
254254
- `run-to-abs-pos` will run to an absolute position specified by `position_sp`
255255
and then stop using the command specified in `stop_command`.
@@ -1148,11 +1148,11 @@ class Sensor(Device):
11481148
The sensor class provides a uniform interface for using most of the
11491149
sensors available for the EV3. The various underlying device drivers will
11501150
create a `lego-sensor` device for interacting with the sensors.
1151-
1151+
11521152
Sensors are primarily controlled by setting the `mode` and monitored by
11531153
reading the `value<N>` attributes. Values can be converted to floating point
11541154
if needed by `value<N>` / 10.0 ^ `decimals`.
1155-
1155+
11561156
Since the name of the `sensor<N>` device node does not correspond to the port
11571157
that a sensor is plugged in to, you must look at the `port_name` attribute if
11581158
you need to know which port a sensor is plugged in to. However, if you don't
@@ -1644,7 +1644,7 @@ def trigger(self):
16441644
complex. A simple trigger isn't configurable and is designed to slot into
16451645
existing subsystems with minimal additional code. Examples are the `ide-disk` and
16461646
`nand-disk` triggers.
1647-
1647+
16481648
Complex triggers whilst available to all LEDs have LED specific
16491649
parameters and work on a per LED basis. The `timer` trigger is an example.
16501650
The `timer` trigger will periodically change the LED brightness between
@@ -2112,12 +2112,12 @@ class LegoPort(Device):
21122112
WeDo and LEGO Power Functions sensors and motors. Supported devices include
21132113
the LEGO MINDSTORMS EV3 Intelligent Brick, the LEGO WeDo USB hub and
21142114
various sensor multiplexers from 3rd party manufacturers.
2115-
2115+
21162116
Some types of ports may have multiple modes of operation. For example, the
21172117
input ports on the EV3 brick can communicate with sensors using UART, I2C
21182118
or analog validate signals - but not all at the same time. Therefore there
21192119
are multiple modes available to connect to the different types of sensors.
2120-
2120+
21212121
In most cases, ports are able to automatically detect what type of sensor
21222122
or motor is connected. In some cases though, this must be manually specified
21232123
using the `mode` and `set_device` attributes. The `mode` attribute affects
@@ -2127,7 +2127,7 @@ class LegoPort(Device):
21272127
appropriate for the connected sensor. The `set_device` attribute is used to
21282128
specify the exact type of sensor that is connected. Note: the mode must be
21292129
correctly set before setting the sensor type.
2130-
2130+
21312131
Ports can be found at `/sys/class/lego-port/port<N>` where `<N>` is
21322132
incremented each time a new port is registered. Note: The number is not
21332133
related to the actual port at all - use the `port_name` attribute to find

templates/generic-class.liquid

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ if currentClass.driverName %}{%
1919
endif %}
2020
class {{ class_name }}({{ base_class }}):
2121

22-
"""{% for line in currentClass.description %}
23-
{{ line }}{% endfor %}
22+
"""{%
23+
for line in currentClass.description %}{%
24+
if line %}
25+
{{ line }}{%
26+
else %}
27+
{% endif %}{%
28+
endfor %}
2429
"""
2530
{% if currentClass.inheritance %}
2631
SYSTEM_CLASS_NAME = {{ base_class }}.SYSTEM_CLASS_NAME

templates/generic-get-set.liquid

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ for prop in currentClass.systemProperties %}{%
1212
@property
1313
def {{prop_name}}(self):
1414
"""{%
15-
for line in prop.description %}
15+
for line in prop.description %}{%
16+
if line %}
1617
{{ line }}{%
18+
else %}
19+
{% endif %}{%
1720
endfor %}
1821
"""{%
1922
if prop.readAccess %}

0 commit comments

Comments
 (0)