From 9d01d216e0c544a8e590abe83f40660f8b7dff5b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 5 Nov 2026 21:24:20 -0500 Subject: [PATCH] style: use `import test_manifest_xml` everywhere Align with Google style guides and `import test_manifest_xml` as a module rather than import symbols out of it. Change-Id: Ib85716bea2eb09028e05b86d445336405e1df870 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/654809 Reviewed-by: Brian Gan Tested-by: Mike Frysinger Commit-Queue: Mike Frysinger --- .flake8 | 2 +- tests/test_git_superproject.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.flake8 b/.flake8 index e1c9d1486..34b3862a0 100644 --- a/.flake8 +++ b/.flake8 @@ -3,7 +3,7 @@ max-line-length = 80 per-file-ignores = # E501: line too long - tests/test_git_superproject.py: E501 IMR241, + tests/test_git_superproject.py: E501, # IMR241: When using the from syntax, only submodules are imported, not module elements. # NB: Do not add any more here. command.py: IMR241, diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index 6d7140aa8..e7f208d9c 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py @@ -22,7 +22,7 @@ import unittest from unittest import mock import pytest -from test_manifest_xml import sort_attributes +import test_manifest_xml import git_superproject import git_trace2_event_log @@ -255,7 +255,7 @@ class SuperprojectTestCase(unittest.TestCase): with open(manifest_path) as fp: manifest_xml_data = fp.read() self.assertEqual( - sort_attributes(manifest_xml_data), + test_manifest_xml.sort_attributes(manifest_xml_data), '' '' '' @@ -290,7 +290,7 @@ class SuperprojectTestCase(unittest.TestCase): with open(update_result.manifest_path) as fp: manifest_xml_data = fp.read() self.assertEqual( - sort_attributes(manifest_xml_data), + test_manifest_xml.sort_attributes(manifest_xml_data), '' '' '' @@ -317,7 +317,7 @@ class SuperprojectTestCase(unittest.TestCase): self.maxDiff = None self.assertIsNone(manifest.superproject) self.assertEqual( - sort_attributes(manifest.ToXml().toxml()), + test_manifest_xml.sort_attributes(manifest.ToXml().toxml()), '' '' '' @@ -379,7 +379,7 @@ class SuperprojectTestCase(unittest.TestCase): # Verify platform/vendor/x's project revision hasn't # changed. self.assertEqual( - sort_attributes(manifest_xml_data), + test_manifest_xml.sort_attributes(manifest_xml_data), '' '' '' @@ -444,7 +444,7 @@ class SuperprojectTestCase(unittest.TestCase): # Verify platform/vendor/x's project revision hasn't # changed. self.assertEqual( - sort_attributes(manifest_xml_data), + test_manifest_xml.sort_attributes(manifest_xml_data), '' '' ''