Skip to content

Commit

Permalink
Remove usage of pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
christiansandberg committed Feb 28, 2024
1 parent 417d285 commit f6a38c2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pytest_reporter_html1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from pkg_resources import get_distribution, DistributionNotFound

from importlib.metadata import version

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = version("pytest-reporter-html1")
except Exception:
# package is not installed
__version__ = "unknown"

Expand Down

0 comments on commit f6a38c2

Please sign in to comment.