Unverified Commit 283cdde4 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] add shellcheck, use latest pre-commit hook versions (#6685)

parent 98936155
......@@ -13,7 +13,7 @@ exclude: |
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
......@@ -25,7 +25,7 @@ repos:
args: ["--settings-path", "python-package/pyproject.toml"]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.7
rev: v0.7.0
hooks:
# Run the linter.
- id: ruff
......@@ -35,3 +35,7 @@ repos:
- id: ruff-format
args: ["--config", "python-package/pyproject.toml"]
types_or: [python, jupyter]
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
......@@ -876,8 +876,7 @@ def _load_pandas_categorical(
max_offset = -getsize(file_name)
with open(file_name, "rb") as f:
while True:
if offset < max_offset:
offset = max_offset
offset = max(offset, max_offset)
f.seek(offset, SEEK_END)
lines = f.readlines()
if len(lines) >= 2:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment