Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (iterative#354)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.6.1 → v0.6.2](astral-sh/ruff-pre-commit@v0.6.1...v0.6.2)

* add noqa SIM115

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Matt Seddon <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and mattseddon authored Aug 27, 2024
1 parent 65fc722 commit 8e0034e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: trailing-whitespace
exclude: '^LICENSES/'
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.6.1'
rev: 'v0.6.2'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion src/datachain/catalog/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,7 @@ def query(
"""
from datachain.query.dataset import ExecutionResult

feature_file = tempfile.NamedTemporaryFile(
feature_file = tempfile.NamedTemporaryFile( # noqa: SIM115
dir=os.getcwd(), suffix=".py", delete=False
)
_, feature_module = os.path.split(feature_file.name)
Expand Down
2 changes: 1 addition & 1 deletion src/datachain/lib/arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def arrow_type_mapper(col_type: pa.DataType) -> type: # noqa: PLR0911


def _nrows_file(file: File, nrows: int) -> str:
tf = NamedTemporaryFile(delete=False)
tf = NamedTemporaryFile(delete=False) # noqa: SIM115
with file.open(mode="r") as reader:
with open(tf.name, "a") as writer:
for row, line in enumerate(reader):
Expand Down
2 changes: 1 addition & 1 deletion src/datachain/lib/webdataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def __init__(self, **kwargs):
self._tar = None

def open(self):
self._tar = tarfile.open(fileobj=super().open())
self._tar = tarfile.open(fileobj=super().open()) # noqa: SIM115
return self

def getmembers(self) -> list[tarfile.TarInfo]:
Expand Down

0 comments on commit 8e0034e

Please sign in to comment.