From db695c889b64806942a5085772db0ad14d15f226 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:48:23 +0000 Subject: [PATCH] [pre-commit.ci] Apply automatic pre-commit fixes --- conda-store-server/conda_store_server/_internal/utils.py | 7 +++---- conda-store-server/tests/plugins/lock/test_conda_lock.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/conda-store-server/conda_store_server/_internal/utils.py b/conda-store-server/conda_store_server/_internal/utils.py index 2d1eca26e..4e7e06fc8 100644 --- a/conda-store-server/conda_store_server/_internal/utils.py +++ b/conda-store-server/conda_store_server/_internal/utils.py @@ -3,6 +3,7 @@ # license that can be found in the LICENSE file. import contextlib +import functools import hashlib import json import os @@ -10,9 +11,8 @@ import re import subprocess import sys -import time -import functools import tempfile +import time from typing import AnyStr, Callable from filelock import FileLock @@ -195,7 +195,6 @@ def run_in_tempdir(f: Callable): @functools.wraps(f) def wrapper(*args, **kwargs): with contextlib.ExitStack() as stack: - # create a temporary directory tmpdir = stack.enter_context(tempfile.TemporaryDirectory()) @@ -206,4 +205,4 @@ def wrapper(*args, **kwargs): result = f(*args, **kwargs) return result - return wrapper \ No newline at end of file + return wrapper diff --git a/conda-store-server/tests/plugins/lock/test_conda_lock.py b/conda-store-server/tests/plugins/lock/test_conda_lock.py index d2688addc..06b0702bf 100644 --- a/conda-store-server/tests/plugins/lock/test_conda_lock.py +++ b/conda-store-server/tests/plugins/lock/test_conda_lock.py @@ -2,7 +2,6 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -import os from unittest import mock import pytest @@ -28,6 +27,7 @@ def test_solve_lockfile( request, ): """Test that the call to conda_lock.run_lock is formed correctly.""" + # Dump dummy data to the expected lockfile output location def run_lock_side_effect(lockfile_path, **kwargs): with open(lockfile_path, "w") as f: