Skip to content

Commit

Permalink
Fix import locations in policy module
Browse files Browse the repository at this point in the history
These had to be imported at the bottom to avoid a circular import. Now
that we got rid of the globals in the policy module, we can move these
into the right place.
  • Loading branch information
lkollar committed Nov 7, 2023
1 parent dc74991 commit b88448f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/auditwheel/policy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

from ..libc import Libc, get_libc
from ..musllinux import find_musl_libc, get_musl_version
from .external_references import lddtree_external_references
from .versioned_symbols import versioned_symbols_policy

_HERE = Path(__file__).parent

Expand Down Expand Up @@ -199,10 +201,6 @@ def get_replace_platforms(name: str) -> list[str]:
return ["linux_" + "_".join(name.split("_")[1:])]


# These have to be imported here to avoid a circular import.
from .external_references import lddtree_external_references # noqa
from .versioned_symbols import versioned_symbols_policy # noqa

def _load_policy_schema():
with open(join(dirname(abspath(__file__)), "policy-schema.json")) as f_:
schema = json.load(f_)
Expand Down

0 comments on commit b88448f

Please sign in to comment.