From 612e46662fc600c1facd9f0ff8d46ac51e4a02d3 Mon Sep 17 00:00:00 2001 From: Vibhatha Abeykoon Date: Wed, 8 May 2024 12:00:57 +0530 Subject: [PATCH] fix: formatting --- dev/archery/archery/linking.py | 3 ++- dev/archery/archery/tests/test_linking.py | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dev/archery/archery/linking.py b/dev/archery/archery/linking.py index ddcaba6277ed0..694c4ca072162 100644 --- a/dev/archery/archery/linking.py +++ b/dev/archery/archery/linking.py @@ -64,7 +64,8 @@ def list_dependency_names(self): return names def _remove_weak_symbols(self, symbol_info): - return [line for line in symbol_info if not line.endswith((" v", " V", " w", " W"))] + return [line for line in symbol_info if not line.endswith( + (" v", " V", " w", " W"))] def _remove_symbol_versions(self, symbol_info): return [line.split('@')[0].strip() for line in symbol_info] diff --git a/dev/archery/archery/tests/test_linking.py b/dev/archery/archery/tests/test_linking.py index 5cc67b9922698..4b68675ee5f02 100644 --- a/dev/archery/archery/tests/test_linking.py +++ b/dev/archery/archery/tests/test_linking.py @@ -19,11 +19,14 @@ def test_remove_weak_symbols(self): - symbol_info = ["symbol1 v", "symbol2 V", "symbol3", "symbol4 w", "symbol5 W", "symbol6"] + symbol_info = ["symbol1 v", "symbol2 V", + "symbol3", "symbol4 w", "symbol5 W", "symbol6"] expected_result = ["symbol3", "symbol6"] self.assertEqual(_remove_weak_symbols(self, symbol_info), expected_result) + def test_remove_symbol_versions(self): - symbol_info = ["symbol1@version1", "symbol2@version2", "symbol3", "symbol4@version4"] - expected_result = ["symbol1", "symbol2", "symbol3", "symbol4"] - self.assertEqual(_remove_symbol_versions(self, symbol_info), expected_result) \ No newline at end of file + symbol_info = ["symbol1@version1", + "symbol2@version2", "symbol3", "symbol4@version4"] + expected_result = ["symbol1", "symbol2", "symbol3", "symbol4"] + self.assertEqual(_remove_symbol_versions(self, symbol_info), expected_result)