Skip to content

Commit e2ecb89

Browse files
committed
added pylint comment to stop warning about await
1 parent ea11bf1 commit e2ecb89

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/async_call_nb.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
},
283283
{
284284
"cell_type": "code",
285-
"execution_count": 7,
285+
"execution_count": null,
286286
"id": "5eea7de3",
287287
"metadata": {},
288288
"outputs": [
@@ -492,7 +492,7 @@
492492
") as client:\n",
493493
" # --- Authentication (must complete before any data requests) ---\n",
494494
" try:\n",
495-
" token_data = await post_authentication_async(machine_id, password, app_key, AUTH_TOKEN_URL, client)\n",
495+
" token_data = await post_authentication_async(machine_id, password, app_key, AUTH_TOKEN_URL, client) # pylint: disable=await-outside-async\n",
496496
" print(\"Authentication successful. Access token obtained.\")\n",
497497
"\n",
498498
" access_token = token_data.get(\"access_token\")\n",
@@ -518,7 +518,7 @@
518518
" # gather() runs all tasks concurrently. return_exceptions=True\n",
519519
" # prevents a single failure from cancelling the remaining tasks —\n",
520520
" # each exception is returned as a value instead of being raised.\n",
521-
" results_history = await asyncio.gather(*tasks_history, return_exceptions=True)\n",
521+
" results_history = await asyncio.gather(*tasks_history, return_exceptions=True) # pylint: disable=await-outside-async\n",
522522
"\n",
523523
" # Pair each RIC with its result (or exception) to be a dictionary, and handle individually.\n",
524524
" result_data_dict = dict(zip(HISTORICAL_RICS, results_history))\n",
@@ -534,10 +534,10 @@
534534
" elapsed = time.perf_counter() - start_time\n",
535535
" elapsed_string = f\"**Sending Historical-Pricing for ({len(HISTORICAL_RICS)} RICs (with throttling {max_concurrent_tasks})) in {elapsed:0.2f} seconds.**\"\n",
536536
" display(Markdown(elapsed_string))\n",
537-
"\n",
538-
" await asyncio.sleep(1) # Just to ensure all output is printed before revoking the token.\n",
537+
" # Just to ensure all output is printed before revoking the token.\n",
538+
" await asyncio.sleep(1) # pylint: disable=await-outside-async \n",
539539
" print(\"Revoking access token...\")\n",
540-
" await post_auth_revoke_async(access_token, app_key, AUTH_REVOKE_URL, client)\n",
540+
" await post_auth_revoke_async(access_token, app_key, AUTH_REVOKE_URL, client) # pylint: disable=await-outside-async\n",
541541
" print(\"Access token revoked successfully.\\n\")\n",
542542
"\n",
543543
" \n",

0 commit comments

Comments
 (0)