Skip to content

Commit

Permalink
refactor(cli): use compat.importlib_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner committed Sep 15, 2024
1 parent 92a8da9 commit fb5ac82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/deptry/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import shutil
import sys
from collections import defaultdict
from importlib.metadata import version
from pathlib import Path
from typing import TYPE_CHECKING

import click

from deptry.compat import importlib_metadata
from deptry.config import read_configuration_from_pyproject_toml
from deptry.core import Core

Expand Down Expand Up @@ -102,7 +102,7 @@ def display_deptry_version(ctx: click.Context, _param: click.Parameter, value: b
if not value or ctx.resilient_parsing:
return None

click.echo(f'deptry {version("deptry")}')
click.echo(f'deptry {importlib_metadata.version("deptry")}')
ctx.exit()


Expand Down

0 comments on commit fb5ac82

Please sign in to comment.