From e7b183d92ff2b6079497f36de4a51fc9424f8cba Mon Sep 17 00:00:00 2001 From: Daniel Copley Date: Mon, 11 Nov 2024 18:08:18 -0500 Subject: [PATCH] add --no-input to environment pip installs closes #1802 --- backend/src/hatchling/metadata/spec.py | 2 +- src/hatch/env/plugin/interface.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/backend/src/hatchling/metadata/spec.py b/backend/src/hatchling/metadata/spec.py index 0c8f85c53..7a4d1e12b 100644 --- a/backend/src/hatchling/metadata/spec.py +++ b/backend/src/hatchling/metadata/spec.py @@ -175,7 +175,7 @@ def project_metadata_from_core_metadata(core_metadata: str) -> dict[str, Any]: left, _, right = marker if left.value == 'extra': extra = right.value - del markers[i] # noqa: B909 + del markers[i] # If there was only one marker then there will be an unnecessary # trailing semicolon in the string representation if not markers: diff --git a/src/hatch/env/plugin/interface.py b/src/hatch/env/plugin/interface.py index ab18b77eb..be6fe3055 100644 --- a/src/hatch/env/plugin/interface.py +++ b/src/hatch/env/plugin/interface.py @@ -768,7 +768,16 @@ def construct_pip_install_command(self, args: list[str]): A convenience method for constructing a [`pip install`](https://pip.pypa.io/en/stable/cli/pip_install/) command with the given verbosity. The default verbosity is set to one less than Hatch's verbosity. """ - command = ['python', '-u', '-m', 'pip', 'install', '--disable-pip-version-check', '--no-python-version-warning'] + command = [ + 'python', + '-u', + '-m', + 'pip', + 'install', + '--disable-pip-version-check', + '--no-python-version-warning', + '--no-input', + ] # Default to -1 verbosity add_verbosity_flag(command, self.verbosity, adjustment=-1)