Skip to content

Commit

Permalink
fix: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vibhatha committed May 8, 2024
1 parent 97c3a7d commit 612e466
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion dev/archery/archery/linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
11 changes: 7 additions & 4 deletions dev/archery/archery/tests/test_linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
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)

0 comments on commit 612e466

Please sign in to comment.