|
282 | 282 | }, |
283 | 283 | { |
284 | 284 | "cell_type": "code", |
285 | | - "execution_count": 7, |
| 285 | + "execution_count": null, |
286 | 286 | "id": "5eea7de3", |
287 | 287 | "metadata": {}, |
288 | 288 | "outputs": [ |
|
492 | 492 | ") as client:\n", |
493 | 493 | " # --- Authentication (must complete before any data requests) ---\n", |
494 | 494 | " 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", |
496 | 496 | " print(\"Authentication successful. Access token obtained.\")\n", |
497 | 497 | "\n", |
498 | 498 | " access_token = token_data.get(\"access_token\")\n", |
|
518 | 518 | " # gather() runs all tasks concurrently. return_exceptions=True\n", |
519 | 519 | " # prevents a single failure from cancelling the remaining tasks —\n", |
520 | 520 | " # 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", |
522 | 522 | "\n", |
523 | 523 | " # Pair each RIC with its result (or exception) to be a dictionary, and handle individually.\n", |
524 | 524 | " result_data_dict = dict(zip(HISTORICAL_RICS, results_history))\n", |
|
534 | 534 | " elapsed = time.perf_counter() - start_time\n", |
535 | 535 | " elapsed_string = f\"**Sending Historical-Pricing for ({len(HISTORICAL_RICS)} RICs (with throttling {max_concurrent_tasks})) in {elapsed:0.2f} seconds.**\"\n", |
536 | 536 | " 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", |
539 | 539 | " 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", |
541 | 541 | " print(\"Access token revoked successfully.\\n\")\n", |
542 | 542 | "\n", |
543 | 543 | " \n", |
|
0 commit comments