Fix lint errors in tools/hiddenapi

Bug: 177317659
Test: tools/hiddenapi/generate_hiddenapi_lists_test.py
Change-Id: I7fe52319a80d929d43fdec913d2e7f155de96549
This commit is contained in:
Paul Duffin
2021-02-09 10:43:08 +00:00
parent 2019bc53c2
commit f16a93c5b2
2 changed files with 3 additions and 3 deletions

View File

@@ -153,7 +153,7 @@ def write_lines(filename, lines):
"""Writes list of lines into a file, overwriting the file if it exists. """Writes list of lines into a file, overwriting the file if it exists.
Args: Args:
filename (string): Path to the file to be writting into. filename (string): Path to the file to be writing into.
lines (list): List of strings to write into the file. lines (list): List of strings to write into the file.
""" """
lines = map(lambda line: line + '\n', lines) lines = map(lambda line: line + '\n', lines)

View File

@@ -20,7 +20,7 @@ from generate_hiddenapi_lists import *
class TestHiddenapiListGeneration(unittest.TestCase): class TestHiddenapiListGeneration(unittest.TestCase):
def test_filter_apis(self): def test_filter_apis(self):
# Initialize flags so that A and B are put on the whitelist and # Initialize flags so that A and B are put on the allow list and
# C, D, E are left unassigned. Try filtering for the unassigned ones. # C, D, E are left unassigned. Try filtering for the unassigned ones.
flags = FlagsDict() flags = FlagsDict()
flags.parse_and_merge_csv(['A,' + FLAG_SDK, 'B,' + FLAG_SDK, flags.parse_and_merge_csv(['A,' + FLAG_SDK, 'B,' + FLAG_SDK,
@@ -39,7 +39,7 @@ class TestHiddenapiListGeneration(unittest.TestCase):
# Check three things: # Check three things:
# (1) B is selected as valid unassigned # (1) B is selected as valid unassigned
# (2) A is not selected because it is assigned 'whitelist' # (2) A is not selected because it is assigned to the allow list
# (3) D is not selected because it is not a valid key # (3) D is not selected because it is not a valid key
self.assertEqual( self.assertEqual(
flags.get_valid_subset_of_unassigned_apis(set(['A', 'B', 'D'])), set([ 'B' ])) flags.get_valid_subset_of_unassigned_apis(set(['A', 'B', 'D'])), set([ 'B' ]))