Skip to content

Commit

Permalink
use importlib for package version
Browse files Browse the repository at this point in the history
  • Loading branch information
geritwagner committed May 15, 2024
1 parent 6aea2e3 commit efa2001
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions search_query/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# pylint: disable=missing-module-docstring
import pkg_resources
try:
from importlib.metadata import version
except ImportError: # pragma: no cover
# For Python < 3.8
from importlib_metadata import version # type: ignore

__version__ = pkg_resources.get_distribution("search_query").version
__version__ = version("colrev")

0 comments on commit efa2001

Please sign in to comment.