Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 6, 2023
1 parent 009f743 commit 8bb7d8e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
9 changes: 7 additions & 2 deletions src/auditwheel/main_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def execute(args, p):
% (fn, winfo.overall_tag)
)

if wheel_policy.get_priority_by_name(winfo.pyfpe_tag) < wheel_policy.priority_highest:
if (
wheel_policy.get_priority_by_name(winfo.pyfpe_tag)
< wheel_policy.priority_highest
):
printp(
"This wheel uses the PyFPE_jbuf function, which is not compatible with the"
" manylinux1 tag. (see https://www.python.org/dev/peps/pep-0513/"
Expand Down Expand Up @@ -92,7 +95,9 @@ def execute(args, p):
if args.verbose < 1:
return

libs = winfo.external_refs[wheel_policy.get_policy_name(wheel_policy.priority_lowest)]["libs"]
libs = winfo.external_refs[
wheel_policy.get_policy_name(wheel_policy.priority_lowest)
]["libs"]
if len(libs) == 0:
printp("The wheel requires no external shared libraries! :)")
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_manylinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import pytest
from elftools.elf.elffile import ELFFile

from auditwheel.policy import get_arch_name, WheelPolicies
from auditwheel.policy import WheelPolicies, get_arch_name

logger = logging.getLogger(__name__)

Expand Down
8 changes: 6 additions & 2 deletions tests/integration/test_policy_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ def test_policy_checks_glibc():
assert policy > wheel_policy.priority_lowest
policy = versioned_symbols_policy(wheel_policy, {"some_library.so": {"GLIBC_999"}})
assert policy == wheel_policy.priority_lowest
policy = versioned_symbols_policy(wheel_policy, {"some_library.so": {"OPENSSL_1_1_0"}})
policy = versioned_symbols_policy(
wheel_policy, {"some_library.so": {"OPENSSL_1_1_0"}}
)
assert policy == wheel_policy.priority_highest
policy = versioned_symbols_policy(wheel_policy, {"some_library.so": {"IAMALIBRARY"}})
policy = versioned_symbols_policy(
wheel_policy, {"some_library.so": {"IAMALIBRARY"}}
)
assert policy == wheel_policy.priority_highest
4 changes: 3 additions & 1 deletion tests/unit/test_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def test_filter_libs(self):
"libs": {lib: {"needed": [], "realpath": "/path/to/lib"} for lib in libs},
}
wheel_policy = WheelPolicies.load()
full_external_refs = lddtree_external_references(wheel_policy.policies, lddtree, "/path/to/wheel")
full_external_refs = lddtree_external_references(
wheel_policy.policies, lddtree, "/path/to/wheel"
)

# Assert that each policy only has the unfiltered libs.
for policy in full_external_refs:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_wheel_abi.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from __future__ import annotations

import os
from auditwheel.policy import WheelPolicies

import pretend
import pytest

from auditwheel import wheel_abi
from auditwheel.policy import WheelPolicies


class TestGetWheelElfdata:
Expand Down

0 comments on commit 8bb7d8e

Please sign in to comment.