Skip to content

Commit

Permalink
Defer platform import
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Aug 27, 2024
1 parent e0b4f09 commit 8436e81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion importlib_metadata/_compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import platform
import sys

__all__ = ['install', 'NullFinder']
Expand Down Expand Up @@ -52,5 +51,7 @@ def pypy_partial(val):
Workaround for #327.
"""
import platform

is_pypy = platform.python_implementation() == 'PyPy'
return val + is_pypy

0 comments on commit 8436e81

Please sign in to comment.