Skip to content

Azure Keyvault Secrets - Type Mismatch Warning #41417

Closed
@AssafM-GC

Description

@AssafM-GC
  • Package Name: azure-identity, azure-keyvault-secrets
  • Package Version: 1.22.0, 4.9.0
  • Operating System: Linux
  • Python Version: 3.12

Describe the bug
Pycharm complains that SecretClient "Expected type 'TokenCredential', got 'ClientSecretCredential' instead"
basically a duplicate of this

To Reproduce
Steps to reproduce the behavior:
1.
credentials = ClientSecretCredential( tenant_id=tenant_id, client_id=client_id, client_secret=client_secret) client = SecretClient( vault_url=vault_url, credential=credentials)

Expected behavior
No warnings

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
When __init__ is called from the class KeyVaultClientBase I tried to change the typing construct from: credential: TokenCredential to: credential: Type[TokenCredential] and that solved the issue

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.KeyVaultcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions