Skip to content
New issue

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

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

Already on GitHub? # to your account

Check the existence of the export command before attempting to delete it #18

Merged
merged 2 commits into from
Nov 24, 2021
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 21.8b0
rev: 21.11b1
hooks:
- id: black

Expand All @@ -10,7 +10,7 @@ repos:
- id: flake8

- repo: https://github.com/timothycrosley/isort
rev: 5.9.3
rev: 5.10.1
hooks:
- id: isort
additional_dependencies: [toml]
Expand Down
3 changes: 2 additions & 1 deletion src/poetry_export_plugin/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def activate(self, application: "Application"):

# If you're checking this code out to get inspiration
# for your own plugins: DON'T DO THIS!
del application.command_loader._factories["export"]
if "export" in application.command_loader._factories:
del application.command_loader._factories["export"]

for command in COMMANDS:
application.command_loader.register_factory(command, load_command(command))