@@ -111,21 +111,38 @@ class RainbowRain(Rain):
111
111
Rainbow Rain animation.
112
112
"""
113
113
114
- def __init__ (self , grid_object , speed , count = 1 , length = 3 , background = BLACK , name = None ):
114
+ def __init__ ( # pylint: disable=too-many-arguments
115
+ self , grid_object , speed , count = 1 , length = 3 , background = BLACK , name = None
116
+ ):
115
117
super ().__init__ (grid_object , speed , BLACK , count , length , background , name )
116
118
117
119
def _generate_droplet (self , x , length ):
118
120
color = colorwheel (random .randint (0 , 255 ))
119
- return [[n , calculate_intensity (color , 1.0 - - ((n + 1 )/ (length + 1 )))] for n in range (- length , 0 )]
121
+ return [
122
+ [n , calculate_intensity (color , 1.0 - - ((n + 1 ) / (length + 1 )))]
123
+ for n in range (- length , 0 )
124
+ ]
120
125
121
126
122
127
class MatrixRain (Rain ):
123
128
"""
124
129
The Matrix style animation.
125
130
"""
126
131
127
- def __init__ (self , grid_object , speed , color = GREEN , count = 1 , length = 3 , background = (0 , 64 , 0 ), name = None ):
132
+ def __init__ ( # pylint: disable=too-many-arguments
133
+ self ,
134
+ grid_object ,
135
+ speed ,
136
+ color = GREEN ,
137
+ count = 1 ,
138
+ length = 3 ,
139
+ background = (0 , 64 , 0 ),
140
+ name = None ,
141
+ ):
128
142
super ().__init__ (grid_object , speed , color , count , length , background , name )
129
143
130
144
def _generate_droplet (self , x , length ):
131
- return [[n , calculate_intensity (self .color , random .randint (10 , 100 ) * 1.0 )] for n in range (- length , 0 )]
145
+ return [
146
+ [n , calculate_intensity (self .color , random .randint (10 , 100 ) * 1.0 )]
147
+ for n in range (- length , 0 )
148
+ ]
0 commit comments