diff --git a/src/poetry/console/commands/about.py b/src/poetry/console/commands/about.py index cf2548d6f59..56d8e7acdf0 100644 --- a/src/poetry/console/commands/about.py +++ b/src/poetry/console/commands/about.py @@ -1,14 +1,8 @@ from __future__ import annotations -from typing import TYPE_CHECKING - from poetry.console.commands.command import Command -if TYPE_CHECKING: - from collections.abc import Callable - - class AboutCommand(Command): name = "about" @@ -17,16 +11,12 @@ class AboutCommand(Command): def handle(self) -> int: from poetry.utils._compat import metadata - # The metadata.version that we import for Python 3.7 is untyped, work around - # that. - version: Callable[[str], str] = metadata.version - self.line( f"""\ Poetry - Package Management for Python -Version: {version('poetry')} -Poetry-Core Version: {version('poetry-core')} +Version: {metadata.version('poetry')} +Poetry-Core Version: {metadata.version('poetry-core')} Poetry is a dependency manager tracking local dependencies of your projects\ and libraries.