diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 99c8a8e6..1c1dcfb5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,20 +17,20 @@ repos: - id: check-added-large-files - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black name: "Black: The uncompromising Python code formatter" - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: 6.0.1 hooks: - id: isort name: "Sort Imports" args: ["--profile", "black"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.11.4 hooks: # Run the linter. - id: ruff diff --git a/dataset_reader/sparse_reader.py b/dataset_reader/sparse_reader.py index 51beecaf..6f35c49a 100644 --- a/dataset_reader/sparse_reader.py +++ b/dataset_reader/sparse_reader.py @@ -8,7 +8,7 @@ def read_sparse_matrix_fields( - filename: Union[Path, str] + filename: Union[Path, str], ) -> Tuple[np.array, np.array, np.array]: """Read the fields of a CSR matrix without instantiating it""" @@ -68,7 +68,7 @@ def read_csr_matrix(filename: Union[Path, str], do_mmap=True) -> Iterator[Sparse def knn_result_read( - filename: Union[Path, str] + filename: Union[Path, str], ) -> Tuple[List[List[int]], List[List[float]]]: n, d = map(int, np.fromfile(filename, dtype="uint32", count=2)) assert os.stat(filename).st_size == 8 + n * d * (4 + 4)