From 3eb042b37a043239a3cd5b5b59f11d9abaa6f3df Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:57:23 +0000 Subject: [PATCH] [pre-commit.ci] Apply automatic pre-commit fixes --- .../_internal/plugins/lock/conda_lock/conda_lock.py | 4 +++- .../tests/_internal/plugins/lock/test_conda_lock.py | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py b/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py index 2bb5ae72d..a4fb35c0a 100644 --- a/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py +++ b/conda-store-server/conda_store_server/_internal/plugins/lock/conda_lock/conda_lock.py @@ -34,7 +34,9 @@ def lock_environment( ) -> str: context.log.info("lock_environment entrypoint for conda-lock") conda_command = self._conda_command( - context.conda_store, namespace=context.namespace, environment=context.environment + context.conda_store, + namespace=context.namespace, + environment=context.environment, ) conda_flags = self._conda_flags(context.conda_store) diff --git a/conda-store-server/tests/_internal/plugins/lock/test_conda_lock.py b/conda-store-server/tests/_internal/plugins/lock/test_conda_lock.py index 26f2f589c..c29013ea5 100644 --- a/conda-store-server/tests/_internal/plugins/lock/test_conda_lock.py +++ b/conda-store-server/tests/_internal/plugins/lock/test_conda_lock.py @@ -77,10 +77,8 @@ def test_solve_lockfile_simple(conda_store, simple_specification): @mock.patch("conda_store_server._internal.plugins.lock.conda_lock.conda_lock.run_lock") def test_solve_right_conda_command(mock_run_lock, conda_store, simple_specification): # Update conda_command settings - conda_store.set_settings( - data={"conda_command": "conda"} - ) - + conda_store.set_settings(data={"conda_command": "conda"}) + # Dump dummy data to the expected lockfile output location def run_lock_side_effect(lockfile_path, **kwargs): pass @@ -89,7 +87,9 @@ def run_lock_side_effect(lockfile_path, **kwargs): locker = conda_lock.CondaLock() locker.lock_environment( - context=plugin_context.PluginContext(conda_store, namespace="test", environment="one"), + context=plugin_context.PluginContext( + conda_store, namespace="test", environment="one" + ), spec=simple_specification, platforms=[conda_utils.conda_platform()], )