Skip to content

Commit

Permalink
Remove unnecessary plugin activation overload
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus committed Oct 13, 2024
1 parent e44448c commit 06b4dd8
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/poetry_plugin_shell/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,10 @@


if TYPE_CHECKING:
from poetry.console.application import Application
from poetry.console.commands.command import Command


class ShellApplicationPlugin(ApplicationPlugin):
@property
def commands(self) -> list[type[Command]]:
return [ShellCommand]

def activate(self, application: Application) -> None:
# Removing the existing shell command to avoid an error
# If you're checking this code out to get inspiration
# for your own plugins: DON'T DO THIS!
if application.command_loader.has("shell"):
del application.command_loader._factories["shell"]
super().activate(application=application)

0 comments on commit 06b4dd8

Please sign in to comment.