Skip to content

Commit a14a498

Browse files
authored
🎨 Python code fromated with psf/black
1 parent 75e76de commit a14a498

File tree

7 files changed

+4
-14
lines changed

7 files changed

+4
-14
lines changed

p5/core/vertex.py

-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ def end_contour():
271271
contour_vertices_types.append(curr_contour_vertices_types)
272272
curr_contour_vertices, curr_contour_vertices_types = [], []
273273
elif builtins.current_renderer == "skia":
274-
275274
vert_data = copy.deepcopy(contour_vertices[0])
276275
vert_data[-1]["is_vert"] = contour_vertices[0][-1].get("is_vert", None)
277276
vert_data[-1]["move_to"] = False

p5/sketch/Skia2DRenderer/renderer2d.py

-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,6 @@ def _do_fill_stroke_close(self, close_shape):
527527
def end_shape(
528528
self, mode, vertices, is_curve, is_bezier, is_quadratic, is_contour, shape_kind
529529
):
530-
531530
close_shape = mode == constants.CLOSE
532531
# NOT APPENDING AGAIN
533532
num_verts = len(vertices)

p5/sketch/Vispy2DRenderer/openglrenderer.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,7 @@ def render_default(self, draw_type, draw_queue):
321321
for vertices, idx, color in draw_queue:
322322
num_shape_verts = len(vertices)
323323

324-
data["position"][
325-
sidx : (sidx + num_shape_verts),
326-
] = np.array(vertices)
324+
data["position"][sidx : (sidx + num_shape_verts),] = np.array(vertices)
327325

328326
color_array = np.array([color] * num_shape_verts)
329327
data["color"][sidx : sidx + num_shape_verts, :] = color_array

p5/sketch/Vispy2DRenderer/renderer2d.py

-2
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ def load_font(self, font_name):
417417
return self.create_font(font_name)
418418

419419
def text(self, text_string, position, wrap_at):
420-
421420
multiline = False
422421
if not (wrap_at is None):
423422
text_string = textwrap.fill(text_string, wrap_at)
@@ -538,7 +537,6 @@ def text_wrap(self, text_wrap_style):
538537
raise NotImplementedError("Not Implemented in Vispy")
539538

540539
def image(self, img, x, y, w, h):
541-
542540
location = (x, y)
543541
if w is None:
544542
w = img.size[0]

p5/sketch/Vispy3DRenderer/renderer3d.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,9 @@ def render_with_shaders(self, draw_type, draw_obj):
384384
# it's information to the buffer.
385385
#
386386
draw_indices = []
387-
data["position"][
388-
0:num_vertices,
389-
] = np.array(vertices)
387+
data["position"][0:num_vertices,] = np.array(vertices)
390388
draw_indices.append(idx)
391-
data["normal"][
392-
0:num_vertices,
393-
] = np.array(normals)
389+
data["normal"][0:num_vertices,] = np.array(normals)
394390
self.vertex_buffer.set_data(data)
395391
self.index_buffer.set_data(np.hstack(draw_indices))
396392

p5/visualTests/sanityTests/2DSanityTests/test4.py

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ def setup():
66

77

88
def draw():
9-
109
if frame_count > 30:
1110
exit()
1211
# Sets the screen to be 640 pixels wide and 360 pixels high

p5/visualTests/sanityTests/2DSanityTests/test8.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
y = 0
44

5+
56
# The statements in the setup() function
67
# run once when the program begins
78
def setup():

0 commit comments

Comments
 (0)