Fix for native comments raising linting errors

feature/galactic_unicorn
ZodiusInfuser 2022-07-29 12:16:45 +01:00 zatwierdzone przez Phil Howard
rodzic 34a1a54cd1
commit 2283e73368
3 zmienionych plików z 11 dodań i 11 usunięć

Wyświetl plik

@ -5,7 +5,7 @@ from galactic import GalacticUnicorn
gu = GalacticUnicorn()
@micropython.native
@micropython.native # noqa: F821
def setup_landscape():
global width, height, heat, fire_spawns, damping_factor
width = GalacticUnicorn.WIDTH + 2
@ -15,7 +15,7 @@ def setup_landscape():
damping_factor = 0.97
@micropython.native
@micropython.native # noqa: F821
def setup_portrait():
global width, height, heat, fire_spawns, damping_factor
width = GalacticUnicorn.HEIGHT + 2
@ -25,7 +25,7 @@ def setup_portrait():
damping_factor = 0.99
@micropython.native
@micropython.native # noqa: F821
def update():
# clear the bottom row and then add a new fire seed to it
for x in range(width):
@ -55,7 +55,7 @@ def update():
heat[x][y] = average
@micropython.native
@micropython.native # noqa: F821
def draw_landscape():
for y in range(GalacticUnicorn.HEIGHT):
for x in range(GalacticUnicorn.WIDTH):
@ -73,7 +73,7 @@ def draw_landscape():
gu.set_pixel(x, y, 255, 255, 180)
@micropython.native
@micropython.native # noqa: F821
def draw_portrait():
for y in range(GalacticUnicorn.WIDTH):
for x in range(GalacticUnicorn.HEIGHT):

Wyświetl plik

@ -17,7 +17,7 @@ class Blob():
self.dy = (float(random.randint(0, 2)) / 10.0) - 0.05 # positive bias
@micropython.native
@micropython.native # noqa: F821
def setup_portrait():
global width, height, liquid, blobs
width = GalacticUnicorn.HEIGHT
@ -29,7 +29,7 @@ def setup_portrait():
hue = 0.0
@micropython.native
@micropython.native # noqa: F821
def from_hsv(h, s, v):
i = math.floor(h * 6.0)
f = h * 6.0 - i
@ -53,7 +53,7 @@ def from_hsv(h, s, v):
return int(v), int(p), int(q)
@micropython.native
@micropython.native # noqa: F821
def update_liquid():
for y in range(height):
for x in range(width):
@ -75,7 +75,7 @@ def update_liquid():
liquid[x][y] += 1.0 - (d_sq / r_sq)
@micropython.native
@micropython.native # noqa: F821
def move_blobs():
for blob in blobs:
blob.x += blob.dx
@ -88,7 +88,7 @@ def move_blobs():
blob.dy = 0.0 - blob.dy
@micropython.native
@micropython.native # noqa: F821
def draw_portrait():
global hue
hue += 0.001

Wyświetl plik

@ -58,7 +58,7 @@ PROMPT_BBC_MICRO = 2
prompt = 0
@micropython.native
@micropython.native # noqa: F821
def draw(image, fg, bg, time_ms):
for y in range(len(image)):
row = image[y]