Skip to content

Commit 037b4e5

Browse files
committed
jack-o-lintern
1 parent 9646244 commit 037b4e5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

TFT_Gizmo_Snowglobe/snowglobe_fancy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
bitmap=displayio.Bitmap,
4646
palette=displayio.Palette)
4747
# Or just use solid color
48-
except:
48+
except OSError:
4949
bg_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
5050
bg_palette = displayio.Palette(1)
5151
bg_palette[0] = BACKGROUND
@@ -90,6 +90,7 @@
9090
display.show(splash)
9191

9292
def clear_the_snow():
93+
#pylint: disable=global-statement, redefined-outer-name
9394
global flakes, flake_pos, snow_depth
9495
display.auto_refresh = False
9596
for flake in flakes:
@@ -123,7 +124,7 @@ def add_snow(index, amount, steepness=2):
123124
# check depth to left AND right
124125
if snow_depth[x-1] - snow_depth[x] < steepness and \
125126
snow_depth[x+1] - snow_depth[x] < steepness:
126-
add = True
127+
add = True
127128
if add:
128129
location.append(x)
129130
# add where snow is not too steep

TFT_Gizmo_Snowglobe/snowglobe_simple.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
bitmap=displayio.Bitmap,
3939
palette=displayio.Palette)
4040
# Or just use solid color
41-
except:
41+
except OSError:
4242
bg_bitmap = displayio.Bitmap(WIDTH, HEIGHT, 1)
4343
bg_palette = displayio.Palette(1)
4444
bg_palette[0] = BACKGROUND
@@ -82,6 +82,7 @@
8282
display.show(splash)
8383

8484
def clear_the_snow():
85+
#pylint: disable=global-statement, redefined-outer-name
8586
global flakes, flake_pos, snow_depth
8687
display.auto_refresh = False
8788
for flake in flakes:
@@ -115,7 +116,7 @@ def add_snow(index, amount, steepness=2):
115116
# check depth to left AND right
116117
if snow_depth[x-1] - snow_depth[x] < steepness and \
117118
snow_depth[x+1] - snow_depth[x] < steepness:
118-
add = True
119+
add = True
119120
if add:
120121
location.append(x)
121122
# add where snow is not too steep

0 commit comments

Comments
 (0)