remove superfluous "global"

Unnecessary, as the variable isn't reassigned.
pull/57/head
Klaus Brunner 2023-01-03 07:59:41 +01:00 zatwierdzone przez GitHub
rodzic c82971b6e0
commit 386c71a536
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 0 dodań i 1 usunięć

Wyświetl plik

@ -3,7 +3,6 @@ from machine import Pin, Timer
led = Pin("LED", Pin.OUT) led = Pin("LED", Pin.OUT)
tim = Timer() tim = Timer()
def tick(timer): def tick(timer):
global led
led.toggle() led.toggle()
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick) tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)