Clean up pylint warnings

Bug: 232546567
Test: atest --host mainline_modules_sdks_test
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc build/mainline_modules_sdks*.py
Change-Id: I114104805f85d7bc1cb5a3b94f076f39c1ddd38e
This commit is contained in:
Paul Duffin
2022-07-25 17:50:19 +00:00
parent 113e7e63a9
commit 6f5c8d7afb
2 changed files with 16 additions and 9 deletions

View File

@@ -99,8 +99,8 @@ class FakeSnapshotBuilder(mm.SnapshotBuilder):
@staticmethod
def write_data_to_file(file, data):
with open(file, "w") as file:
file.write(data)
with open(file, "w", encoding="utf8") as fd:
fd.write(data)
def create_snapshot_info_file(self, module, sdk_info_file, sdk):
if module == MAINLINE_MODULES_BY_APEX["com.android.art"]:
@@ -112,7 +112,7 @@ class FakeSnapshotBuilder(mm.SnapshotBuilder):
def build_sdk_scope_targets(self, build_release, sdk_version, modules):
target_paths = []
target_dict = dict()
target_dict = {}
for module in modules:
for sdk in module.sdks:
if "host-exports" in sdk or "test-exports" in sdk: