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

craft-application migration cleanup: pack command #1704

Merged
merged 5 commits into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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: 10 additions & 1 deletion charmcraft/application/commands/lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import pathlib
import sys
import textwrap
from typing import TYPE_CHECKING, cast
from typing import TYPE_CHECKING, Any, cast

import craft_cli
from craft_application.commands import lifecycle
Expand Down Expand Up @@ -174,3 +174,12 @@ def run_managed(self, parsed_args: argparse.Namespace) -> bool:
if sys.platform == "linux" and charmcraft_yaml and charmcraft_yaml.get("type") == "bundle":
return False
return super().run_managed(parsed_args)

def _run(
self,
parsed_args: argparse.Namespace,
step_name: str | None = None,
**kwargs: Any, # noqa: ANN401 (allow dynamic typing)
) -> None:
self._validate_args(parsed_args)
return super()._run(parsed_args, step_name, **kwargs)
285 changes: 0 additions & 285 deletions charmcraft/commands/pack.py

This file was deleted.

3 changes: 1 addition & 2 deletions charmcraft/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
)

from charmcraft import config, const, env, utils
from charmcraft.commands import pack, store, version
from charmcraft.commands import store, version
from charmcraft.parts import setup_parts

# set up all the libs' loggers in DEBUG level so their content is grabbed by craft-cli's Emitter
Expand All @@ -57,7 +57,6 @@
# central place and not distributed in several classes/files. Also note that order here is
# important when listing commands and showing help.
_basic_commands = [
pack.PackCommand,
version.VersionCommand,
]
_charmhub_commands = [
Expand Down
Loading
Loading