Skip to content

Commit 9b06a6a

Browse files
committed
format
1 parent d087e2c commit 9b06a6a

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

tests/cc/current_py_cc_headers/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
16-
load("@rules_shell//shell:sh_test.bzl", "sh_test")
1716
load("//python:py_test.bzl", "py_test")
1817
load(":current_py_cc_headers_tests.bzl", "current_py_cc_headers_test_suite")
1918

tests/cc/current_py_cc_headers/abi3_headers_linkage_test.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
21
import os.path
2+
import pathlib
33
import sys
4-
import pefile
54
import unittest
6-
import pathlib
5+
6+
import pefile
77

88
from python.runfiles import runfiles
99

10+
1011
class CheckLinkageTest(unittest.TestCase):
1112
@unittest.skipUnless(sys.platform.startswith("win"), "requires windows")
1213
def test_linkage_windows(self):
@@ -16,16 +17,13 @@ def test_linkage_windows(self):
1617
self.fail(f"dll at {dll_path} does not exist")
1718

1819
pe = pefile.PE(dll_path)
19-
if not hasattr(pe, 'DIRECTORY_ENTRY_IMPORT'):
20+
if not hasattr(pe, "DIRECTORY_ENTRY_IMPORT"):
2021
self.fail("No import directory found.")
2122

2223
imported_dlls = [
23-
entry.dll.decode('utf-8').lower()
24-
for entry in pe.DIRECTORY_ENTRY_IMPORT
25-
]
26-
python_dlls = [
27-
dll for dll in imported_dlls if dll.startswith("python3")
24+
entry.dll.decode("utf-8").lower() for entry in pe.DIRECTORY_ENTRY_IMPORT
2825
]
26+
python_dlls = [dll for dll in imported_dlls if dll.startswith("python3")]
2927
self.assertEqual(python_dlls, ["python3.dll"])
3028

3129

0 commit comments

Comments
 (0)