resolve line-too-long in api
@@ -173,7 +173,8 @@ def _FilterGoldenProtoDict(golden_proto_dict, omit_golden_symbols_map):
filtered_members = [
m for m in members if m.name not in symbol_list
]
- # Two steps because protobuf repeated fields disallow slice assignment.
+ # Two steps because protobuf repeated fields disallow slice
+ # assignment.
del members[:]
members.extend(filtered_members)
return filtered_proto_dict
@@ -203,11 +204,12 @@ class ApiCompatibilityTest(tf.test.TestCase):
"""Diff given dicts of protobufs and report differences a readable way.
Args:
- expected_dict: a dict of TFAPIObject protos constructed from golden files.
- actual_dict: a ict of TFAPIObject protos constructed by reading from the
- TF package linked to the test.
- verbose: Whether to log the full diffs, or simply report which files were
- different.
+ expected_dict: a dict of TFAPIObject protos constructed from golden
+ files.
+ actual_dict: a ict of TFAPIObject protos constructed by reading from
+ the TF package linked to the test.
+ verbose: Whether to log the full diffs, or simply report which files
+ were different.
update_goldens: Whether to update goldens when there are diffs found.
additional_missing_object_message: Message to print when a symbol is
missing.
@@ -249,8 +251,8 @@ class ApiCompatibilityTest(tf.test.TestCase):
diff_message = "Change detected in python object: %s." % key
verbose_diff_message = str(e)
- # All difference cases covered above. If any difference found, add to the
- # list.
+ # All difference cases covered above. If any difference found, add
+ # to the list.
if diff_message:
diffs.append(diff_message)
verbose_diffs.append(verbose_diff_message)
@@ -273,8 +275,9 @@ class ApiCompatibilityTest(tf.test.TestCase):
filepath = _KeyToFilePath(key, api_version)
tf.io.gfile.remove(filepath)
- # If the files are only in actual (current library), these are new
- # modules. Write them to files. Also record all updates in files.
+ # If the files are only in actual (current library), these are
+ # new modules. Write them to files. Also record all updates in
+ # files.
for key in only_in_actual | set(updated_keys):
filepath = _KeyToFilePath(key, api_version)
file_io.write_string_to_file(
@@ -332,7 +335,8 @@ class ApiCompatibilityTest(tf.test.TestCase):
)
# Diff them. Do not fail if called with update.
- # If the test is run to update goldens, only report diffs but do not fail.
+ # If the test is run to update goldens, only report diffs but do not
+ # fail.
self._AssertProtoDictEquals(
golden_proto_dict,
proto_dict,
