Skip to content

Commit 0f1e26d

Browse files
committed
Do not omit trailing comma in case this is a one-element tuple
1 parent 1d145ea commit 0f1e26d

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

ev3dev/brickpi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ class Leds(object):
5050
blue_one = Led(name='brickpi1:blue:ev3dev')
5151
blue_two = Led(name='brickpi2:blue:ev3dev')
5252

53-
BLUE_ONE = (blue_one)
54-
BLUE_TWO = (blue_two)
53+
BLUE_ONE = (blue_one, )
54+
BLUE_TWO = (blue_two, )
5555

56-
BLUE = (1)
56+
BLUE = (1, )
5757

5858
@staticmethod
5959
def set_color(group, color, pct=1):

ev3dev/ev3.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ class Leds(object):
5252
green_left = Led(name='ev3-left1:green:ev3dev')
5353
green_right = Led(name='ev3-right1:green:ev3dev')
5454

55-
LEFT = (red_left, green_left)
56-
RIGHT = (red_right, green_right)
57-
58-
RED = (1, 0)
59-
GREEN = (0, 1)
60-
AMBER = (1, 1)
61-
ORANGE = (1, 0.5)
62-
YELLOW = (0.5, 1)
55+
LEFT = (red_left, green_left, )
56+
RIGHT = (red_right, green_right, )
57+
58+
RED = (1, 0, )
59+
GREEN = (0, 1, )
60+
AMBER = (1, 1, )
61+
ORANGE = (1, 0.5, )
62+
YELLOW = (0.5, 1, )
6363

6464
@staticmethod
6565
def set_color(group, color, pct=1):

templates/led-colors.liquid

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ endfor %}
66
assign groupName = group.name | upcase | underscore_spaces %}
77
{{ groupName }} = ({% for e in group.entries %}{%
88
assign instance = e | downcase | underscore_spaces
9-
%}{{ instance }}{% unless forloop.last %}, {% endunless %}{%
9+
%}{{ instance }}, {%
1010
endfor %}){%
1111
endfor %}
1212
{% for color in currentClass.colors %}{%
1313
assign colorName = color.name | upcase | underscore_spaces %}
14-
{{ colorName }} = ({% for v in color.value %}{{ v }}{% unless forloop.last %}, {% endunless %}{%endfor %}){%
14+
{{ colorName }} = ({% for v in color.value %}{{ v }}, {%endfor %}){%
1515
endfor %}
1616

1717
@staticmethod

0 commit comments

Comments
 (0)