|
10 | 10 | # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11 | 11 | # ANY KIND, either express or implied. See the License for the specific
|
12 | 12 | # language governing permissions and limitations under the License.
|
13 |
| -""" |
14 |
| -Utility functions for use in AWS Encryption SDK test vector handlers. |
15 |
| -""" |
| 13 | +"""Utility functions for use in AWS Encryption SDK test vector handlers.""" |
16 | 14 | import os
|
17 | 15 | import struct
|
18 | 16 | from binascii import unhexlify
|
@@ -100,7 +98,7 @@ def membership_validator(allowed):
|
100 | 98 | def _validate_membership(instance, attribute, value):
|
101 | 99 | # type: (object, Attribute, Any) -> None
|
102 | 100 | # pylint: disable=unused-argument
|
103 |
| - """""" |
| 101 | + """Perform membership check.""" |
104 | 102 | if value not in allowed:
|
105 | 103 | raise ValueError(
|
106 | 104 | 'Unknown "{name}" value "{actual}" not in {expected}'.format(
|
@@ -178,9 +176,9 @@ def algorithm_suite_from_string_id(string_id):
|
178 | 176 | return AlgorithmSuite.get_by_id(numeric_id)
|
179 | 177 |
|
180 | 178 |
|
181 |
| -# TODO: I want to replace these functions with an extensible "URI Handler" class |
182 |
| -# that will abstract away any file handling. This will vastly simply extending |
183 |
| -# these handlers to work with files in some non-local location, such as S3. |
| 179 | +# I want to replace these functions with an extensible "URI Handler" class |
| 180 | +# that will abstract away any file handling. This will vastly simply extending |
| 181 | +# these handlers to work with files in some non-local location, such as S3. |
184 | 182 | def file_writer(parent_dir):
|
185 | 183 | # type: (str) -> Callable[[str, bytes], str]
|
186 | 184 | """Return a caller that will write the requested named data to a file and return
|
@@ -214,7 +212,7 @@ def _write_file(name, data):
|
214 | 212 |
|
215 | 213 | def file_reader(parent_dir):
|
216 | 214 | # type: (str) -> Callable[[str], bytes]
|
217 |
| - """Returns a callable that accepts a URI identifying a file relative to ``parent_dir`` |
| 215 | + """Return a callable that accepts a URI identifying a file relative to ``parent_dir`` |
218 | 216 | and returns the binary contents of that file.
|
219 | 217 |
|
220 | 218 | :param str parent_dir: Parent directory to use as the relative root for all URIs
|
|
0 commit comments