Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files

- repo: https://github.com/psf/black
rev: 24.10.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
hooks:
- id: black
name: "Black: The uncompromising Python code formatter"

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 6.1.0
hooks:
- id: isort
name: "Sort Imports"
args: ["--profile", "black"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.13.3
hooks:
# Run the linter.
- id: ruff
Expand Down
4 changes: 2 additions & 2 deletions dataset_reader/sparse_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""

Expand Down Expand Up @@ -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)
Expand Down