Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove fancy bullets, just use hyphens #8608

Merged
merged 4 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/poetry/console/commands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,5 @@ def notify_about_existing_packages(self, existing_packages: list[str]) -> None:
" be skipped:\n"
)
for name in existing_packages:
self.line(f" <c1>{name}</c1>")
self.line(f" - <c1>{name}</c1>")
self.line(self._hint_update_packages)
2 changes: 1 addition & 1 deletion src/poetry/console/commands/self/show/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _system_project_handle(self) -> int:
package = info.package
description = " " + package.description if package.description else ""
self.line("")
self.line(f" <c1>{name}</c1> (<c2>{package.version}</c2>){description}")
self.line(f" - <c1>{name}</c1> (<c2>{package.version}</c2>){description}")
provide_line = " "

if info.plugins:
Expand Down
28 changes: 14 additions & 14 deletions src/poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,18 +248,18 @@ def _execute_operation(self, operation: Operation) -> None:
with self._lock:
self._sections[id(operation)] = self._io.section()
self._sections[id(operation)].write_line(
f" <fg=blue;options=bold></> {op_message}:"
f" <fg=blue;options=bold>-</> {op_message}:"
" <fg=blue>Pending...</>"
)
else:
if self._should_write_operation(operation):
if not operation.skipped:
self._io.write_line(
f" <fg=blue;options=bold></> {op_message}"
f" <fg=blue;options=bold>-</> {op_message}"
)
else:
self._io.write_line(
f" <fg=default;options=bold,dark></> {op_message}: "
f" <fg=default;options=bold,dark>-</> {op_message}: "
"<fg=default;options=bold,dark>Skipped</> "
"<fg=default;options=dark>for the following reason:</> "
f"<fg=default;options=bold,dark>{operation.skip_reason}</>"
Expand Down Expand Up @@ -287,7 +287,7 @@ def _execute_operation(self, operation: Operation) -> None:
io = self._io
else:
message = (
" <error></error>"
" <error>-</error>"
f" {self.get_operation_message(operation, error=True)}:"
" <error>Failed</error>"
)
Expand Down Expand Up @@ -343,7 +343,7 @@ def _execute_operation(self, operation: Operation) -> None:
except KeyboardInterrupt:
try:
message = (
" <warning></warning>"
" <warning>-</warning>"
f" {self.get_operation_message(operation, warning=True)}:"
" <warning>Cancelled</warning>"
)
Expand All @@ -363,7 +363,7 @@ def _do_execute_operation(self, operation: Operation) -> int:
if self.supports_fancy_output():
self._write(
operation,
f" <fg=default;options=bold,dark></> {operation_message}: "
f" <fg=default;options=bold,dark>-</> {operation_message}: "
"<fg=default;options=bold,dark>Skipped</> "
"<fg=default;options=dark>for the following reason:</> "
f"<fg=default;options=bold,dark>{operation.skip_reason}</>",
Expand All @@ -382,7 +382,7 @@ def _do_execute_operation(self, operation: Operation) -> int:
return result

operation_message = self.get_operation_message(operation, done=True)
message = f" <fg=green;options=bold></> {operation_message}"
message = f" <fg=green;options=bold>-</> {operation_message}"
self._write(operation, message)

self._increment_operations_count(operation, True)
Expand Down Expand Up @@ -516,7 +516,7 @@ def _execute_update(self, operation: Install | Update) -> int:

def _execute_uninstall(self, operation: Uninstall) -> int:
op_msg = self.get_operation_message(operation)
message = f" <fg=blue;options=bold></> {op_msg}: <info>Removing...</info>"
message = f" <fg=blue;options=bold>-</> {op_msg}: <info>Removing...</info>"
self._write(operation, message)

return self._remove(operation.package)
Expand All @@ -543,7 +543,7 @@ def _install(self, operation: Install | Update) -> int:

operation_message = self.get_operation_message(operation)
message = (
f" <fg=blue;options=bold></> {operation_message}:"
f" <fg=blue;options=bold>-</> {operation_message}:"
" <info>Installing...</info>"
)
self._write(operation, message)
Expand Down Expand Up @@ -591,7 +591,7 @@ def _prepare_archive(
operation_message = self.get_operation_message(operation)

message = (
f" <fg=blue;options=bold></> {operation_message}:"
f" <fg=blue;options=bold>-</> {operation_message}:"
" <info>Preparing...</info>"
)
self._write(operation, message)
Expand Down Expand Up @@ -630,7 +630,7 @@ def _prepare_git_archive(self, operation: Install | Update) -> Path:
operation_message = self.get_operation_message(operation)

message = (
f" <fg=blue;options=bold></> {operation_message}: <info>Cloning...</info>"
f" <fg=blue;options=bold>-</> {operation_message}: <info>Cloning...</info>"
)
self._write(operation, message)

Expand Down Expand Up @@ -673,7 +673,7 @@ def _install_directory_without_wheel_installer(
operation_message = self.get_operation_message(operation)

message = (
f" <fg=blue;options=bold></> {operation_message}:"
f" <fg=blue;options=bold>-</> {operation_message}:"
" <info>Building...</info>"
)
self._write(operation, message)
Expand Down Expand Up @@ -773,7 +773,7 @@ def _download_link(self, operation: Install | Update, link: Link) -> Path:

if archive.suffix != ".whl":
message = (
f" <fg=blue;options=bold></> {self.get_operation_message(operation)}:"
f" <fg=blue;options=bold>-</> {self.get_operation_message(operation)}:"
" <info>Preparing...</info>"
)
self._write(operation, message)
Expand Down Expand Up @@ -814,7 +814,7 @@ def _download_archive(

operation_message = self.get_operation_message(operation)
message = (
f" <fg=blue;options=bold></> {operation_message}: <info>Downloading...</>"
f" <fg=blue;options=bold>-</> {operation_message}: <info>Downloading...</>"
)
progress = None
if self.supports_fancy_output():
Expand Down
26 changes: 13 additions & 13 deletions tests/console/commands/self/test_add_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_add_no_constraint(

Package operations: 1 install, 0 updates, 0 removals

Installing poetry-plugin (0.1.0)
- Installing poetry-plugin (0.1.0)

Writing lock file
"""
Expand All @@ -79,7 +79,7 @@ def test_add_with_constraint(

Package operations: 1 install, 0 updates, 0 removals

Installing poetry-plugin (0.2.0)
- Installing poetry-plugin (0.2.0)

Writing lock file
"""
Expand All @@ -101,8 +101,8 @@ def test_add_with_git_constraint(

Package operations: 2 installs, 0 updates, 0 removals

Installing pendulum (2.0.5)
Installing poetry-plugin (0.1.2 9cf87a2)
- Installing pendulum (2.0.5)
- Installing poetry-plugin (0.1.2 9cf87a2)

Writing lock file
"""
Expand All @@ -127,9 +127,9 @@ def test_add_with_git_constraint_with_extras(

Package operations: 3 installs, 0 updates, 0 removals

Installing pendulum (2.0.5)
Installing tomlkit (0.7.0)
Installing poetry-plugin (0.1.2 9cf87a2)
- Installing pendulum (2.0.5)
- Installing tomlkit (0.7.0)
- Installing poetry-plugin (0.1.2 9cf87a2)

Writing lock file
"""
Expand Down Expand Up @@ -167,8 +167,8 @@ def test_add_with_git_constraint_with_subdirectory(

Package operations: 2 installs, 0 updates, 0 removals

Installing pendulum (2.0.5)
Installing poetry-plugin (0.1.2 9cf87a2)
- Installing pendulum (2.0.5)
- Installing poetry-plugin (0.1.2 9cf87a2)

Writing lock file
"""
Expand Down Expand Up @@ -220,7 +220,7 @@ def test_add_existing_plugin_warns_about_no_operation(
The following packages are already present in the pyproject.toml and will be\
skipped:

poetry-plugin
- poetry-plugin
{tester.command._hint_update_packages}
Nothing to add.
"""
Expand Down Expand Up @@ -264,7 +264,7 @@ def test_add_existing_plugin_updates_if_requested(

Package operations: 0 installs, 1 update, 0 removals

Updating poetry-plugin (1.2.3 -> 2.3.4)
- Updating poetry-plugin (1.2.3 -> 2.3.4)

Writing lock file
"""
Expand Down Expand Up @@ -300,8 +300,8 @@ def test_adding_a_plugin_can_update_poetry_dependencies_if_needed(

Package operations: 1 install, 1 update, 0 removals

Updating tomlkit (0.7.1 -> 0.7.2)
Installing poetry-plugin (1.2.3)
- Updating tomlkit (0.7.1 -> 0.7.2)
- Installing poetry-plugin (1.2.3)

Writing lock file
"""
Expand Down
6 changes: 3 additions & 3 deletions tests/console/commands/self/test_remove_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_remove_installed_package(tester: CommandTester) -> None:

Package operations: 0 installs, 0 updates, 1 removal

Removing poetry-plugin (1.2.3)
- Removing poetry-plugin (1.2.3)

Writing lock file
"""
Expand All @@ -95,8 +95,8 @@ def test_remove_installed_package_dry_run(tester: CommandTester) -> None:

Package operations: 0 installs, 0 updates, 1 removal, 1 skipped

Removing poetry-plugin (1.2.3)
Installing poetry ({__version__}): Skipped for the following reason: Already \
- Removing poetry-plugin (1.2.3)
- Installing poetry ({__version__}): Skipped for the following reason: Already \
installed
"""

Expand Down
6 changes: 3 additions & 3 deletions tests/console/commands/self/test_show_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_show_displays_installed_plugins(
tester.execute("")

expected = """
poetry-plugin (1.2.3)
- poetry-plugin (1.2.3)
1 plugin and 1 application plugin
"""

Expand All @@ -189,7 +189,7 @@ def test_show_displays_installed_plugins_with_multiple_plugins(
tester.execute("")

expected = """
poetry-plugin (1.2.3)
- poetry-plugin (1.2.3)
2 plugins and 2 application plugins
"""

Expand All @@ -215,7 +215,7 @@ def test_show_displays_installed_plugins_with_dependencies(
tester.execute("")

expected = """
poetry-plugin (1.2.3)
- poetry-plugin (1.2.3)
1 plugin and 1 application plugin

Dependencies
Expand Down
4 changes: 2 additions & 2 deletions tests/console/commands/self/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def test_self_update_can_update_from_recommended_installation(

Package operations: 0 installs, 2 updates, 0 removals

Updating cleo (0.8.2 -> 1.0.0)
Updating poetry ({__version__} -> {new_version})
- Updating cleo (0.8.2 -> 1.0.0)
- Updating poetry ({__version__} -> {new_version})

Writing lock file
"""
Expand Down
Loading