Skip to content

Commit 8b0ec44

Browse files
committed
docstring cleanup
1 parent 74a6f64 commit 8b0ec44

File tree

14 files changed

+82
-109
lines changed

14 files changed

+82
-109
lines changed

packages/aws-sdk-signers/requirements.txt

Whitespace-only changes.

packages/aws-sdk-signers/src/aws_sdk_signers/__init__.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
5-
AWS SDK Signers provides stand-alone signing functionality for use with
6-
HTTP tools such as AioHTTP, Curl, Postman, Requests, urllib3, etc.
7-
"""
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
"""AWS SDK Signers provides stand-alone signing functionality for use with HTTP tools
4+
such as AioHTTP, Curl, Postman, Requests, urllib3, etc."""
85

96
from __future__ import annotations
107

packages/aws-sdk-signers/src/aws_sdk_signers/_http.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
13
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
5-
64
NOTE TO THE READER:
75
86
This file is _strictly_ temporary and subject to abrupt breaking changes
@@ -61,8 +59,8 @@ def remove(self, value: str) -> None:
6159
return
6260

6361
def as_string(self, delimiter: str = ",") -> str:
64-
"""Get delimited string of all values. A comma followed by a space is used
65-
by default.
62+
"""Get delimited string of all values. A comma followed by a space is used by
63+
default.
6664
6765
If the ``Field`` has zero values, the empty string is returned. If the ``Field``
6866
has exactly one value, the value is returned unmodified.
@@ -316,8 +314,9 @@ def __eq__(self, other: object) -> bool:
316314

317315

318316
class URIParameters(TypedDict):
319-
"""TypedDict representing the parameters for the URI class. These need to be
320-
kept in sync for the `to_dict` method.
317+
"""TypedDict representing the parameters for the URI class.
318+
319+
These need to be kept in sync for the `to_dict` method.
321320
"""
322321

323322
# TODO: Unpack doesn't seem to do what we want, so we need a way to represent

packages/aws-sdk-signers/src/aws_sdk_signers/_identity.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
"""
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
53

64
from dataclasses import dataclass
75
from datetime import UTC, datetime

packages/aws-sdk-signers/src/aws_sdk_signers/_io.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
"""
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
53

64
from asyncio import iscoroutinefunction
75
from collections.abc import AsyncIterable, AsyncIterator, Awaitable, Callable
@@ -44,8 +42,8 @@ def __init__(self, data: StreamingBlob):
4442
async def read(self, size: int = -1) -> bytes:
4543
"""Read a number of bytes from the stream.
4644
47-
:param size: The maximum number of bytes to read. If less than 0, all bytes
48-
will be read.
45+
:param size: The maximum number of bytes to read. If less than 0, all bytes will
46+
be read.
4947
"""
5048
if self._closed or not self._data:
5149
raise ValueError("I/O operation on closed file.")
@@ -93,7 +91,7 @@ def iter_chunks(
9391
"""Iterate over the reader in chunks of a given size.
9492
9593
:param chunk_size: The maximum size of each chunk. If less than 0, the entire
96-
reader will be read into one chunk.
94+
reader will be read into one chunk.
9795
"""
9896
return _AsyncByteStreamIterator(self.read, chunk_size)
9997

@@ -149,8 +147,8 @@ def __init__(self, data: StreamingBlob):
149147
async def read(self, size: int = -1) -> bytes:
150148
"""Read a number of bytes from the stream.
151149
152-
:param size: The maximum number of bytes to read. If less than 0, all bytes
153-
will be read.
150+
:param size: The maximum number of bytes to read. If less than 0, all bytes will
151+
be read.
154152
"""
155153
if self._data_source is None or size == 0:
156154
return self._buffer.read(size)
@@ -227,7 +225,7 @@ def iter_chunks(
227225
"""Iterate over the reader in chunks of a given size.
228226
229227
:param chunk_size: The maximum size of each chunk. If less than 0, the entire
230-
reader will be read into one chunk.
228+
reader will be read into one chunk.
231229
"""
232230
return _AsyncByteStreamIterator(self.read, chunk_size)
233231

@@ -263,8 +261,7 @@ def __init__(self, read: Callable[[int], Awaitable[bytes]], chunk_size: int):
263261
"""Initializes self.
264262
265263
:param read: An async callable that reads a given number of bytes from some
266-
source.
267-
264+
source.
268265
:param chunk_size: The number of bytes to read in each iteration.
269266
"""
270267
self._read = read

packages/aws-sdk-signers/src/aws_sdk_signers/_version.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
"""
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
53

64
# This file is protected via CODEOWNERS
75
from __future__ import annotations

packages/aws-sdk-signers/src/aws_sdk_signers/exceptions.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
"""
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
53

64

75
class AWSSDKWarning(UserWarning): ...
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0

packages/aws-sdk-signers/src/aws_sdk_signers/interfaces/http.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
"""
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
53

64
from __future__ import annotations
75

@@ -35,8 +33,8 @@ class FieldPosition(Enum):
3533
class Field(Protocol):
3634
"""A name-value pair representing a single field in a request or response.
3735
38-
The kind will dictate metadata placement within a message, for example as
39-
a header or trailer field in an HTTP request as defined in RFC 9110 Section 5.
36+
The kind will dictate metadata placement within a message, for example as a header
37+
or trailer field in an HTTP request as defined in RFC 9110 Section 5.
4038
4139
All field names are case insensitive and case-variance must be treated as
4240
equivalent. Names may be normalized but should be preserved for accuracy during

packages/aws-sdk-signers/src/aws_sdk_signers/interfaces/identity.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
"""
2-
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
SPDX-License-Identifier: Apache-2.0
4-
"""
1+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
# SPDX-License-Identifier: Apache-2.0
53

64
from __future__ import annotations
75

0 commit comments

Comments
 (0)