Skip to content

Commit

Permalink
craft-application migration cleanup: pack command (#1704)
Browse files Browse the repository at this point in the history
This pack command existed for comparison with the new one, but is no
longer necessary. It got missed when I was removing some other
no-longer-used commands.
  • Loading branch information
lengau authored Jun 15, 2024
1 parent 1da46c8 commit cfc3702
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 1,309 deletions.
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

0 comments on commit cfc3702

Please sign in to comment.