style(examples) fix style issues in Python examples (#2880)

Removes all semicolons at line endings in the Python examples.
This commit is contained in:
ckielstra
2021-12-05 14:41:17 +01:00
committed by GitHub
parent 0b91b6c42f
commit a5058eafd0
47 changed files with 85 additions and 99 deletions

View File

@@ -37,7 +37,7 @@ panel.update_snap(lv.ANIM.ON)
# Switch between "One scroll" and "Normal scroll" mode
sw = lv.switch(lv.scr_act());
sw = lv.switch(lv.scr_act())
sw.align(lv.ALIGN.TOP_RIGHT, -20, 10)
sw.add_event_cb(lambda evt: sw_event_cb(evt,panel), lv.EVENT.ALL, None)
label = lv.label(lv.scr_act())

View File

@@ -16,7 +16,7 @@ def scroll_event_cb(e):
child_y_center = child_a.y1 + child_a.get_height() // 2
diff_y = child_y_center - cont_y_center;
diff_y = child_y_center - cont_y_center
diff_y = abs(diff_y)
# Get the x of diff_y on a circle.
@@ -26,7 +26,7 @@ def scroll_event_cb(e):
x = r
else:
# Use Pythagoras theorem to get x from radius and y
x_sqr = r * r - diff_y * diff_y;
x_sqr = r * r - diff_y * diff_y
res = lv.sqrt_res_t()
lv.sqrt(x_sqr, res, 0x8000) # Use lvgl's built in sqrt root function
x = r - res.i