Skip to content

Commit 72a3536

Browse files
committed
ran black again
1 parent 722ab30 commit 72a3536

3 files changed

+11
-2
lines changed

examples/requests_api_openskynetwork_private.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
osn_header = {"Authorization": "Basic " + str(base64cred)}
5757
OPENSKY_SOURCE = "https://opensky-network.org/api/states/all?" + "icao24=" + transponder
5858

59+
5960
# Converts seconds to human readable minutes/hours/days
6061
def time_calc(input_time): # input_time in seconds
6162
if input_time < 60:
@@ -72,6 +73,7 @@ def time_calc(input_time): # input_time in seconds
7273
time_output = f"{sleep_int:.1f} days"
7374
return time_output
7475

76+
7577
def _format_datetime(datetime):
7678
return "{:02}/{:02}/{} {:02}:{:02}:{:02}".format(
7779
datetime.tm_mon,
@@ -82,6 +84,7 @@ def _format_datetime(datetime):
8284
datetime.tm_sec,
8385
)
8486

87+
8588
# Connect to Wi-Fi
8689
print("\n===============================")
8790
print("Connecting to WiFi...")
@@ -105,7 +108,7 @@ def _format_datetime(datetime):
105108

106109
print("\nAttempting to GET OpenSky-Network Data!")
107110
opensky_response = request.get(url=OPENSKY_SOURCE, headers=osn_header).json()
108-
111+
109112
# Print Full JSON to Serial (doesn't show credentials)
110113
debug_response = False # Set True to see full response
111114
if debug_response:

examples/requests_api_openskynetwork_private_area.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
+ lonmax
7171
)
7272

73+
7374
# Converts seconds to human readable minutes/hours/days
7475
def time_calc(input_time): # input_time in seconds
7576
if input_time < 60:
@@ -86,6 +87,7 @@ def time_calc(input_time): # input_time in seconds
8687
time_output = f"{sleep_int:.1f} days"
8788
return time_output
8889

90+
8991
def _format_datetime(datetime):
9092
return "{:02}/{:02}/{} {:02}:{:02}:{:02}".format(
9193
datetime.tm_mon,
@@ -96,6 +98,7 @@ def _format_datetime(datetime):
9698
datetime.tm_sec,
9799
)
98100

101+
99102
# Connect to Wi-Fi
100103
print("\n===============================")
101104
print("Connecting to WiFi...")
@@ -119,7 +122,7 @@ def _format_datetime(datetime):
119122

120123
print("\nAttempting to GET OpenSky-Network Data!")
121124
opensky_response = request.get(url=OPENSKY_SOURCE, headers=osn_header).json()
122-
125+
123126
# Print Full JSON to Serial (doesn't show credentials)
124127
debug_response = False # Set True to see full response
125128
if debug_response:

examples/requests_api_openskynetwork_public.py

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
# example https://opensky-network.org/api/states/all?icao24=a808c5
3535
OPENSKY_SOURCE = "https://opensky-network.org/api/states/all?" + "icao24=" + transponder
3636

37+
3738
# Converts seconds to human readable minutes/hours/days
3839
def time_calc(input_time): # input_time in seconds
3940
if input_time < 60:
@@ -50,6 +51,7 @@ def time_calc(input_time): # input_time in seconds
5051
time_output = f"{sleep_int:.1f} days"
5152
return time_output
5253

54+
5355
def _format_datetime(datetime):
5456
return "{:02}/{:02}/{} {:02}:{:02}:{:02}".format(
5557
datetime.tm_mon,
@@ -60,6 +62,7 @@ def _format_datetime(datetime):
6062
datetime.tm_sec,
6163
)
6264

65+
6366
# Connect to Wi-Fi
6467
print("\n===============================")
6568
print("Connecting to WiFi...")

0 commit comments

Comments
 (0)