From e9a407e3262492086185ef13e214b53a7b00811d Mon Sep 17 00:00:00 2001 From: Callahan Kovacs Date: Fri, 6 Oct 2023 14:38:41 -0500 Subject: [PATCH] fix: feedback from PR Signed-off-by: Callahan Kovacs --- snapcraft/commands/remote.py | 6 +++--- snapcraft/remote/utils.py | 2 +- snapcraft/remote/worktree.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/snapcraft/commands/remote.py b/snapcraft/commands/remote.py index fdb719496b..dbde5a4b61 100644 --- a/snapcraft/commands/remote.py +++ b/snapcraft/commands/remote.py @@ -314,7 +314,7 @@ def _get_effective_base(self) -> str: return base - def _get_project_architectures(self) -> List[str]: + def _get_project_build_on_architectures(self) -> List[str]: """Get a list of build-on architectures from the project's snapcraft.yaml. :returns: A list of architectures. @@ -347,11 +347,11 @@ def _determine_architectures(self) -> List[str]: :raises SnapcraftError: If `--build-on` was provided and architectures are defined in the project's snapcraft.yaml. """ - project_architectures = self._get_project_architectures() + project_architectures = self._get_project_build_on_architectures() if project_architectures and self._parsed_args.build_for: raise SnapcraftError( "Cannot use `--build-on` because architectures are already defined in " - "the snapcraft.yaml." + "snapcraft.yaml." ) if project_architectures: diff --git a/snapcraft/remote/utils.py b/snapcraft/remote/utils.py index b82b8b7e39..f4140b16ca 100644 --- a/snapcraft/remote/utils.py +++ b/snapcraft/remote/utils.py @@ -47,7 +47,7 @@ def validate_architectures(architectures: List[str]) -> None: def get_build_id(app_name: str, project_name: str, project_path: Path) -> str: """Get the build id for a project. - The build id is formatted as `snapcraft--`. + The build id is formatted as `--`. The hash is a hash of all files in the project directory. :param app_name: Name of the application. diff --git a/snapcraft/remote/worktree.py b/snapcraft/remote/worktree.py index 2441896990..480bbbf04e 100644 --- a/snapcraft/remote/worktree.py +++ b/snapcraft/remote/worktree.py @@ -21,8 +21,8 @@ from xdg import BaseDirectory -from snapcraft.remote import GitRepo -from snapcraft.remote.utils import rmtree +from .git import GitRepo +from .utils import rmtree class WorkTree: