Skip to content

Commit f9b8918

Browse files
SNOW-2183023: comments cleanup
1 parent fab3af9 commit f9b8918

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/snowflake/connector/_aws_sign_v4.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ def sign_get_caller_identity(
3333
session_token: str | None = None,
3434
) -> dict[str, str]:
3535
"""
36-
Return the SigV4 headers needed for a presigned **POST** to AWS STS
36+
Return the SigV4 headers needed for a presigned POST to AWS STS
3737
`GetCallerIdentity`.
3838
39-
Parameters
40-
----------
39+
Parameters:
40+
4141
url
4242
The full STS endpoint with query parameters
4343
(e.g. ``https://sts.amazonaws.com/?Action=GetCallerIdentity&Version=2011-06-15``)

src/snowflake/connector/wif_util.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"""Workload‑identity attestation helpers.
44
55
This module builds the attestation token that the Snowflake Python connector
6-
sends when Authenticating with *Workload Identity Federation* (WIF).
7-
It supports AWS, Azure, GCP and generic OIDC environments **without** pulling
8-
in heavy SDKs such as *botocore* – we only need a small presigned STS request
6+
sends when Authenticating with Workload Identity Federation (WIF).
7+
It supports AWS, Azure, GCP and generic OIDC environments without pulling
8+
in heavy SDKs such as botocore – we only need a small presigned STS request
99
for AWS and a couple of metadata‑server calls for Azure / GCP.
1010
"""
1111

@@ -66,7 +66,7 @@ def from_string(provider: str) -> AttestationProvider:
6666
@dataclass
6767
class WorkloadIdentityAttestation:
6868
provider: AttestationProvider
69-
credential: str # **base64** JSON blob – provider‑specific
69+
credential: str # base64 JSON blob – provider‑specific
7070
user_identifier_components: dict[str, Any]
7171

7272

@@ -136,7 +136,7 @@ def _partition_from_region(region: str) -> AWSPartition:
136136

137137
def _sts_host_from_region(region: str) -> str | None:
138138
"""
139-
Construct the STS endpoint hostname for *region* according to the
139+
Construct the STS endpoint hostname for region according to the
140140
regionalised-STS rules published by AWS.:contentReference[oaicite:2]{index=2}
141141
142142
References:
@@ -173,8 +173,8 @@ def _try_get_arn_from_env_vars() -> str | None:
173173
def try_compose_aws_user_identifier(region: str | None = None) -> dict[str, str]:
174174
"""Return an identifier for the running AWS workload.
175175
176-
Always includes the AWS *region*; adds an *arn* key only if one is already
177-
discoverable via common environment variables. Returns **{}** only if
176+
Always includes the AWS region; adds an *arn* key only if one is already
177+
discoverable via common environment variables. Returns {} only if
178178
the region cannot be determined."""
179179
region = region or get_region()
180180
if not region:
@@ -189,7 +189,7 @@ def try_compose_aws_user_identifier(region: str | None = None) -> dict[str, str]
189189

190190

191191
def create_aws_attestation() -> WorkloadIdentityAttestation | None:
192-
"""Return AWS attestation or *None* if we're not on AWS / creds missing."""
192+
"""Return AWS attestation or None if we're not on AWS / creds missing."""
193193

194194
creds = load_default_credentials()
195195
if not creds:

test/unit/test_boto_compatibility.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def test_sts_host_from_region_matches_botocore(
119119
):
120120
sf_host = _sts_host_from_region(region)
121121

122-
# Force botocore into **regional** mode so that it doesn’t fall back to the
122+
# Force botocore into regional mode so that it doesn’t fall back to the
123123
# legacy global host (sts.amazonaws.com) for the particular regions (like us-east-1).
124124
# Both approaches work correctly.
125125
monkeypatch.setenv("AWS_STS_REGIONAL_ENDPOINTS", "regional")

0 commit comments

Comments
 (0)