Skip to content

Commit

Permalink
fix zip(..., strict=True) issue for Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Oct 4, 2024
1 parent 427f3e9 commit 679a282
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ plugins = "numpy.typing.mypy_plugin"

[tool.ruff]
lint.select = ["E", "F", "B", "I"]
lint.ignore = ["E501"] # line too long
lint.ignore = ["E501", "B905"] # line too long, zip without explicit `strict`
lint.extend-select = ["I001"] # unsorted-imports
fix = true
target-version = "py311"
Expand Down
3 changes: 2 additions & 1 deletion tests/test_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from __future__ import annotations

import sys
from functools import partial
from pathlib import Path
from typing import Any, Callable, Optional, Sequence, Tuple, Union
Expand Down Expand Up @@ -936,7 +937,7 @@ def test_csr__merge(
np.array_split(sp_coo.row, n_splits),
np.array_split(sp_coo.col, n_splits),
np.array_split(sp_coo.data, n_splits),
strict=False,
**(dict(strict=False) if sys.version_info > (3, 9) else {}),
)
]
_ncsr = _CSR_IO_Buffer.merge(
Expand Down

0 comments on commit 679a282

Please sign in to comment.