File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import 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-
1412if __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())
You can’t perform that action at this time.
0 commit comments