Skip to content

[Core] Fix pylint unused-import warnings for eager msal/requests imports in identity.py - #34001

Draft
Aditya Pujara (a0x1ab) with Copilot wants to merge 3 commits into
devfrom
copilot/fix-pylint-warnings
Draft

[Core] Fix pylint unused-import warnings for eager msal/requests imports in identity.py#34001
Aditya Pujara (a0x1ab) with Copilot wants to merge 3 commits into
devfrom
copilot/fix-pylint-warnings

Conversation

Copilot AI commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command
N/A (core startup path, not a user-facing command)

Description
The eager import msal / import requests added to identity.py (to pre-load modules on the main thread and avoid Python 3.14 import-lock deadlocks) triggered pylint W0611: Unused import failures in azdev style, since the names are not directly referenced in the module.

  • Added # pylint: disable=unused-import inline on both eager-import lines, alongside the existing # noqa: F401 flake8 suppression:
    import msal     # noqa: F401  # pylint: disable=unused-import
    import requests  # noqa: F401  # pylint: disable=unused-import

The eager-import behavior and intent are fully preserved; only the linter suppression is added.

Testing Guide

azdev style azure-cli-core

Confirm Your code has been rated at 10.00/10 with no W0611 errors.

History Notes
{Core} Fix pylint unused-import warnings for eager msal/requests imports


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI and others added 2 commits August 27, 2026 15:24
…during CLI startup to avoid Python 3.14 module-lock deadlock

* Initial plan

* [Core] Eagerly import requests/msal in auth/identity.py to avoid Python 3.14 deadlock

Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix pylint warnings for unused import in identity.py [Core] Fix pylint unused-import warnings for eager msal/requests imports in identity.py Aug 27, 2026
@yonzhan

Copy link
Copy Markdown
Collaborator

Core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants