Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Use verbosity=Verbosity.VERBOSE for io.write_line #16

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions poetry_version_plugin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
from typing import Any, Dict, Optional

from cleo.io.io import IO
from cleo.io.io import IO, Verbosity
from poetry.plugins.plugin import Plugin
from poetry.poetry import Poetry
from poetry.utils.helpers import module_name
Expand Down Expand Up @@ -50,7 +50,8 @@ def activate(self, poetry: Poetry, io: IO) -> None:
else:
io.write_line(
"<b>poetry-version-plugin</b>: Using __init__.py file at "
f"{init_path} for dynamic version"
f"{init_path} for dynamic version",
verbosity=Verbosity.VERBOSE
)
tree = ast.parse(init_path.read_text())
for el in tree.body:
Expand All @@ -72,7 +73,8 @@ def activate(self, poetry: Poetry, io: IO) -> None:
io.write_line(
"<b>poetry-version-plugin</b>: Setting package "
"dynamic version to __version__ "
f"variable from __init__.py: <b>{version}</b>"
f"variable from __init__.py: <b>{version}</b>",
verbosity=Verbosity.VERBOSE
)
poetry.package.set_version(version)
return
Expand All @@ -93,7 +95,8 @@ def activate(self, poetry: Poetry, io: IO) -> None:
tag = result.stdout.strip()
io.write_line(
"<b>poetry-version-plugin</b>: Git tag found, setting "
f"dynamic version to: {tag}"
f"dynamic version to: {tag}",
verbosity=Verbosity.VERBOSE
)
poetry.package.set_version(tag)
return
Expand Down