Skip to content

Commit 653bb1a

Browse files
refactor: Update main_sync function signature to include return type annotation
1 parent 6f6fa42 commit 653bb1a

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

examples/agency.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import onebusaway
22

3-
4-
def main_sync():
3+
def main_sync() -> None:
54
client = onebusaway.OnebusawaySDK(api_key="TEST")
65
agency = client.agency.retrieve("1")
76

@@ -10,25 +9,6 @@ def main_sync():
109
else:
1110
print("Agency data or entry is None.")
1211

13-
1412
if __name__ == "__main__":
1513
print("Running synchronous main function:")
1614
main_sync()
17-
18-
# import asyncio
19-
# import sys
20-
21-
# async def main_async():
22-
# client = onebusaway.AsyncOnebusawaySDK(api_key="TEST")
23-
# agency = await client.agency.retrieve('1')
24-
25-
# if agency.data and agency.data.entry:
26-
# print(agency.data.entry)
27-
# else:
28-
# print("Agency data or entry is None.")
29-
30-
# if __name__ == "__main__":
31-
# if sys.platform.startswith('win'):
32-
# asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
33-
# print("Running asynchronous main function:")
34-
# asyncio.run(main_async())

0 commit comments

Comments
 (0)