Skip to content

Commit ffa8575

Browse files
committed
Change to run pre-commit
1 parent 272f80e commit ffa8575

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

examples/camera/code.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# SPDX-FileCopyrightText: 2023 Limor Fried for Adafruit Industries
33
#
44
# SPDX-License-Identifier: Unlicense
5-
65
import ssl
76
import os
87
import time
@@ -18,19 +17,21 @@
1817

1918
import adafruit_pycamera
2019

21-
UTC_OFFSET = os.getenv('UTC_OFFSET')
22-
TZ = os.getenv('TZ')
23-
2420
# Wifi details are in settings.toml file, also,
25-
# timezone info should be included to allow local time and DST adjustments
21+
# timezone info should be included in settings.toml to allow local time and DST adjustments
2622
# # UTC_OFFSET, if present, will override TZ and DST and no API query will be done
2723
# UTC_OFFSET=-25200
2824
# # TZ="America/Phoenix"
2925

26+
UTC_OFFSET = os.getenv("UTC_OFFSET")
27+
TZ = os.getenv("TZ")
28+
3029
try:
31-
print("Connecting to %s"%os.getenv("CIRCUITPY_WIFI_SSID"))
32-
wifi.radio.connect(os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD"))
33-
print("Connected to %s!"%os.getenv("CIRCUITPY_WIFI_SSID"))
30+
print(f"Connecting to {os.getenv('CIRCUITPY_WIFI_SSID')}")
31+
wifi.radio.connect(
32+
os.getenv("CIRCUITPY_WIFI_SSID"), os.getenv("CIRCUITPY_WIFI_PASSWORD")
33+
)
34+
print(f"Connected to {os.getenv('CIRCUITPY_WIFI_SSID')}!")
3435
print("My IP address is", wifi.radio.ipv4_address)
3536
pool = socketpool.SocketPool(wifi.radio)
3637

0 commit comments

Comments
 (0)