From 5ebd84e58876a8ab904592442bcdd7f628a01b0a Mon Sep 17 00:00:00 2001 From: Florian Ziemen Date: Fri, 15 Nov 2024 17:38:11 +0100 Subject: [PATCH] Update conftest.py for linters --- slkspec/tests/conftest.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/slkspec/tests/conftest.py b/slkspec/tests/conftest.py index 15a07f9..0edcc9e 100644 --- a/slkspec/tests/conftest.py +++ b/slkspec/tests/conftest.py @@ -1,4 +1,5 @@ """pytest definitions to run the unittests.""" + from __future__ import annotations import builtins @@ -6,7 +7,7 @@ from pathlib import Path from subprocess import PIPE, run from tempfile import TemporaryDirectory -from typing import Generator +from typing import Dict, Generator, Union import mock import numpy as np @@ -38,11 +39,22 @@ def search(self, inp_f: builtins.list[str]) -> int | None: self._cache[hash_value] = inp_f return hash_value - def gen_file_query(self, resources: builtins.list[str], **kwargs) -> builtins.list[str]: + def gen_file_query( + self, resources: builtins.list[str], **kwargs: Dict + ) -> builtins.list[str]: """Mock slk_gen_file_qeury.""" return [f for f in resources if Path(f).exists()] - def retrieve(self, resource: int, dest_dir: str, recursive:bool = False, group: Union[bool, None] = None, delayed: bool= False, preserve_path: bool = True, **kwargs) -> None: + def retrieve( + self, + resource: int, + dest_dir: str, + recursive: bool = False, + group: Union[bool, None] = None, + delayed: bool = False, + preserve_path: bool = True, + **kwargs: Dict, + ) -> None: """Mock slk_retrieve.""" for inp_file in map(Path, self._cache[resource]): if preserve_path: