Skip to content

Commit

Permalink
Use importlib.metadata instead of pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh committed Apr 11, 2024
1 parent be34a00 commit 9d7cb96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions proxy/common/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
from ._scm_version import version as __version__ # noqa: WPS433, WPS436
from ._scm_version import version_tuple as _ver_tup # noqa: WPS433, WPS436
except ImportError: # pragma: no cover
from pkg_resources import get_distribution as _get_dist # noqa: WPS433
__version__ = _get_dist('proxy.py').version # noqa: WPS440
from importlib.metadata import version as _get_dist # noqa: WPS433

__version__ = _get_dist("proxy.py") # noqa: WPS440


def _to_int_or_str(inp: str) -> Union[int, str]: # pragma: no cover
Expand Down

0 comments on commit 9d7cb96

Please sign in to comment.