Skip to content

Commit

Permalink
Update package_installed per review
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Robert <[email protected]>
  • Loading branch information
Carifio24 and neutrinoceros authored Jul 15, 2024
1 parent 3df767f commit e9d189c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions echo/qt/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@


def package_installed(package):
try:
__import__(package)
return True
except ImportError:
return False
from importlib.util import find_spec
return find_spec(package) is not None


PYQT5_INSTALLED = package_installed("PyQt5")
Expand Down

0 comments on commit e9d189c

Please sign in to comment.