Skip to content

Commit

Permalink
Update conftest.py for linters
Browse files Browse the repository at this point in the history
  • Loading branch information
florianziemen authored Nov 15, 2024
1 parent 3d391d5 commit 5ebd84e
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions slkspec/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""pytest definitions to run the unittests."""

from __future__ import annotations

import builtins
import shutil
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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5ebd84e

Please sign in to comment.