From 87a2da68dc237ce489040c4d85fa849ec0044fde Mon Sep 17 00:00:00 2001 From: dandds Date: Fri, 1 Nov 2019 15:06:30 -0400 Subject: [PATCH] Fix secrets baseline and type hint error. - detect-secrets was previously bumped to 0.13 but the baseline file was not updated. - mypy objects to the way the Azure Subscription type was defined. Since the module is encapsulated for dependency injection, we can either declare it as a generic or remove the type hint. I did the latter, since I don't know that we gain anything by the former. --- .secrets.baseline | 5 +++-- atst/domain/csp/cloud.py | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 9da7d65d..9e94b782 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -3,7 +3,7 @@ "files": "^.secrets.baseline$|^.*pgsslrootcert.yml$", "lines": null }, - "generated_at": "2019-10-28T18:00:40Z", + "generated_at": "2019-11-01T18:50:54Z", "plugins_used": [ { "base64_limit": 4.5, @@ -17,6 +17,7 @@ "name": "HexHighEntropyString" }, { + "keyword_exclude": null, "name": "KeywordDetector" }, { @@ -197,7 +198,7 @@ } ] }, - "version": "0.12.7", + "version": "0.13.0", "word_list": { "file": null, "hash": null diff --git a/atst/domain/csp/cloud.py b/atst/domain/csp/cloud.py index 9e921757..4cd69d3c 100644 --- a/atst/domain/csp/cloud.py +++ b/atst/domain/csp/cloud.py @@ -472,9 +472,7 @@ class AzureCloudProvider(CloudProviderInterface): credentials = self._get_credential_obj(root_creds) sub_client = self.sdk.subscription.SubscriptionClient(credentials) - subscription: self.sdk.subscription.models.Subscription = sub_client.subscriptions.get( - csp_environment_id - ) + subscription = sub_client.subscriptions.get(csp_environment_id) managment_principal = self._get_management_service_principal()